Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8763f0bd
authored
Feb 20, 2014
by
Oláh István Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: create remove_user method in view
parent
63cd8129
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
circle/dashboard/views.py
+5
-2
No files found.
circle/dashboard/views.py
View file @
8763f0bd
...
@@ -1004,9 +1004,12 @@ class GroupAclRemoveView(LoginRequiredMixin, DeleteView):
...
@@ -1004,9 +1004,12 @@ class GroupAclRemoveView(LoginRequiredMixin, DeleteView):
else
:
else
:
return
[
'dashboard/confirm/base-remove.html'
]
return
[
'dashboard/confirm/base-remove.html'
]
def
remove_user
(
self
,
userpk
):
container
=
self
.
get_object
()
.
profile
container
.
set_level
(
User
.
objects
.
get
(
pk
=
userpk
),
None
)
def
delete
(
self
,
request
,
*
args
,
**
kwargs
):
def
delete
(
self
,
request
,
*
args
,
**
kwargs
):
object
=
self
.
get_object
()
self
.
remove_user
(
kwargs
[
"user_pk"
])
object
.
profile
.
set_level
(
User
.
objects
.
get
(
pk
=
kwargs
[
"user_pk"
]),
None
)
success_url
=
self
.
get_success_url
()
success_url
=
self
.
get_success_url
()
success_message
=
_
(
"Acl member successfully removed from group!"
)
success_message
=
_
(
"Acl member successfully removed from group!"
)
...
...
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