Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mediatek
Base de données Mediatek
Commits
70fde26a
Verified
Commit
70fde26a
authored
Aug 08, 2019
by
erdnaxe
🦋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix staff permissions
parent
d711cd69
Pipeline
#1398
failed with stage
in 3 minutes and 21 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
8 deletions
+1
-8
users/admin.py
users/admin.py
+1
-1
users/models.py
users/models.py
+0
-7
No files found.
users/admin.py
View file @
70fde26a
...
...
@@ -19,7 +19,7 @@ class RightAdmin(VersionAdmin):
class
ClefAdmin
(
VersionAdmin
):
list_display
=
(
'proprio
'
,
'nom
'
)
list_display
=
(
'
nom'
,
'
proprio'
)
class
AdhesionAdmin
(
VersionAdmin
):
...
...
users/models.py
View file @
70fde26a
...
...
@@ -48,16 +48,9 @@ class User(AbstractUser):
except
Right
.
DoesNotExist
:
return
False
def
has_perm
(
self
,
perm
,
obj
=
None
):
return
True
def
has_right
(
self
,
right
):
return
Right
.
objects
.
filter
(
user
=
self
).
filter
(
right
=
ListRight
.
objects
.
get
(
listright
=
right
)).
exists
()
def
has_module_perms
(
self
,
app_label
):
# Simplest version again
return
True
@
property
def
is_adherent
(
self
):
last_adh_year
=
Adhesion
.
objects
.
all
().
order_by
(
'annee_debut'
).
reverse
().
first
()
...
...
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