Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
d00b1efc
authored
Jul 23, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: deny adding entity to acl if already there
parent
40e3d8d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
circle/dashboard/views.py
+10
-0
No files found.
circle/dashboard/views.py
View file @
d00b1efc
...
@@ -1174,10 +1174,20 @@ class AclUpdateView(LoginRequiredMixin, View, SingleObjectMixin):
...
@@ -1174,10 +1174,20 @@ class AclUpdateView(LoginRequiredMixin, View, SingleObjectMixin):
return
return
try
:
try
:
entity
=
search_user
(
name
)
entity
=
search_user
(
name
)
if
self
.
instance
.
object_level_set
.
filter
(
users__in
=
[
entity
]):
messages
.
warning
(
self
.
request
,
_
(
'User "
%
s" has already '
'access to this object.'
)
%
name
)
return
except
User
.
DoesNotExist
:
except
User
.
DoesNotExist
:
entity
=
None
entity
=
None
try
:
try
:
entity
=
Group
.
objects
.
get
(
name
=
name
)
entity
=
Group
.
objects
.
get
(
name
=
name
)
if
self
.
instance
.
object_level_set
.
filter
(
groups__in
=
[
entity
]):
messages
.
warning
(
self
.
request
,
_
(
'Group "
%
s" has already '
'access to this object.'
)
%
name
)
return
except
Group
.
DoesNotExist
:
except
Group
.
DoesNotExist
:
messages
.
warning
(
messages
.
warning
(
self
.
request
,
_
(
'User or group "
%
s" not found.'
)
%
name
)
self
.
request
,
_
(
'User or group "
%
s" not found.'
)
%
name
)
...
...
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