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
Commit
63cd8129
authored
Feb 20, 2014
by
Oláh István Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: quickfix group remove acl member next page redirection
Conflicts: circle/dashboard/views.py
parent
67324baa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
circle/dashboard/views.py
+34
-0
No files found.
circle/dashboard/views.py
View file @
63cd8129
...
@@ -986,6 +986,40 @@ class GroupUserDelete(LoginRequiredMixin, SuperuserRequiredMixin, DeleteView):
...
@@ -986,6 +986,40 @@ class GroupUserDelete(LoginRequiredMixin, SuperuserRequiredMixin, DeleteView):
return
reverse_lazy
(
'dashboard.index'
)
return
reverse_lazy
(
'dashboard.index'
)
class
GroupAclRemoveView
(
LoginRequiredMixin
,
DeleteView
):
model
=
Group
slug_field
=
'pk'
slug_url_kwarg
=
'group_pk'
def
get_success_url
(
self
):
next
=
self
.
request
.
POST
.
get
(
'next'
)
if
next
:
return
next
else
:
return
reverse_lazy
(
'dashboard.views.group-list'
)
def
get_template_names
(
self
):
if
self
.
request
.
is_ajax
():
return
[
'dashboard/confirm/ajax-remove.html'
]
else
:
return
[
'dashboard/confirm/base-remove.html'
]
def
delete
(
self
,
request
,
*
args
,
**
kwargs
):
object
=
self
.
get_object
()
object
.
profile
.
set_level
(
User
.
objects
.
get
(
pk
=
kwargs
[
"user_pk"
]),
None
)
success_url
=
self
.
get_success_url
()
success_message
=
_
(
"Acl member successfully removed from group!"
)
if
request
.
is_ajax
():
return
HttpResponse
(
json
.
dumps
({
'message'
:
success_message
}),
content_type
=
"application/json"
,
)
else
:
messages
.
success
(
request
,
success_message
)
return
HttpResponseRedirect
(
success_url
)
class
GroupDelete
(
LoginRequiredMixin
,
SuperuserRequiredMixin
,
DeleteView
):
class
GroupDelete
(
LoginRequiredMixin
,
SuperuserRequiredMixin
,
DeleteView
):
"""This stuff deletes the group.
"""This stuff deletes the 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