Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
djnro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
itminedu
djnro
Commits
1f0f08cc
Commit
1f0f08cc
authored
Feb 15, 2016
by
Zenon Mousmoulas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up
parent
06588684
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
djnro/templates/edumanage/servers_edit.html
djnro/templates/edumanage/servers_edit.html
+5
-3
edumanage/models.py
edumanage/models.py
+6
-7
No files found.
djnro/templates/edumanage/servers_edit.html
View file @
1f0f08cc
...
...
@@ -10,9 +10,11 @@
<hr>
<form
method=
"POST"
class=
"form-horizontal"
>
{% if form.non_field_errors %}
{% for error in form.non_field_errors %}
<li
class=
"alert-danger"
><strong>
{{ error }}
</strong></li>
{% endfor %}
<ul>
{% for error in form.non_field_errors %}
<li
class=
"alert-danger"
><strong>
{{ error }}
</strong></li>
{% endfor %}
</ul>
{% endif %}
{% csrf_token %}
<div
style=
"display: none"
>
...
...
edumanage/models.py
View file @
1f0f08cc
...
...
@@ -240,7 +240,7 @@ class InstServer(models.Model):
acct_port
=
models
.
PositiveIntegerField
(
max_length
=
5
,
null
=
True
,
blank
=
True
,
default
=
1813
,
help_text
=
_
(
"Default for RADIUS: 1813"
))
status_server
=
models
.
BooleanField
(
help_text
=
_
(
"Do you accept Status-Server requests?"
))
secret
=
models
.
CharField
(
max_length
=
80
,
)
secret
=
models
.
CharField
(
max_length
=
80
)
proto
=
models
.
CharField
(
max_length
=
12
,
choices
=
RADPROTOS
,
default
=
'radius'
)
ts
=
models
.
DateTimeField
(
auto_now
=
True
)
...
...
@@ -262,19 +262,18 @@ class InstServer(models.Model):
return
self
.
name
return
self
.
host
# If a server is a proxy to a realm,
# cannot change its type to SP
# If a server is a proxy for a realm, can not change type to SP
def
clean
(
self
):
if
self
.
ertype
==
2
:
realms
=
InstRealm
.
objects
.
filter
(
proxyto
=
self
)
if
realms
:
if
len
(
realms
)
>
0
:
text
=
str
()
for
realm
in
realms
:
text
=
text
+
' '
+
realm
.
realm
raise
ValidationError
(
'You cannot change this server to SP (
realms "'
+
text
+
'" use him as a proxy)'
)
'You cannot change this server to SP (
it is used by realms %s)'
%
', '
.
join
([
r
.
realm
for
r
in
realms
])
)
class
InstRealmMon
(
models
.
Model
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment