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
c58f55f8
authored
Apr 22, 2014
by
Oláh István Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add getqueryset to GroupList and fix get
parent
f45d9e43
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletions
+15
-1
circle/dashboard/views.py
+15
-1
No files found.
circle/dashboard/views.py
View file @
c58f55f8
...
...
@@ -1002,7 +1002,21 @@ class GroupList(LoginRequiredMixin, SuperuserRequiredMixin, SingleTableView):
content_type
=
"application/json"
,
)
else
:
return
super
(
VmList
,
self
)
.
get
(
*
args
,
**
kwargs
)
return
super
(
GroupList
,
self
)
.
get
(
*
args
,
**
kwargs
)
def
get_queryset
(
self
):
user
=
self
.
request
.
user
logger
.
debug
(
'GroupList.get_queryset() called. User:
%
s'
,
unicode
(
self
.
request
.
user
))
groups
=
[]
if
user
.
has_module_perms
(
'auth'
):
pks
=
[
i
[
0
]
for
i
in
GroupProfile
.
get_objects_with_level
(
'operator'
,
user
)
.
values_list
(
'pk'
)]
groups
=
Group
.
objects
.
filter
(
groupprofile__in
=
pks
)
s
=
self
.
request
.
GET
.
get
(
"s"
)
if
s
:
groups
=
groups
.
filter
(
name__icontains
=
s
)
return
groups
class
GroupUserDelete
(
LoginRequiredMixin
,
SuperuserRequiredMixin
,
DeleteView
):
...
...
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