Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
rpteam
Revue de Press
Commits
4dd89717
Verified
Commit
4dd89717
authored
Nov 29, 2017
by
Thibaut Broggi
Browse files
Add permissions for Profile class
parent
3f34af3d
Changes
2
Hide whitespace changes
Inline
Side-by-side
apps/userprofile/migrations/0002_auto_20171129_1130.py
0 → 100644
View file @
4dd89717
# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-11-29 11:30
from
__future__
import
unicode_literals
from
django.db
import
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'userprofile'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AlterModelOptions
(
name
=
'profile'
,
options
=
{
'permissions'
:
((
'can_edit_users'
,
'Can edit users'
),),
'verbose_name'
:
'User'
},
),
]
apps/userprofile/models.py
View file @
4dd89717
...
...
@@ -39,6 +39,9 @@ class Profile(models.Model):
class
Meta
:
verbose_name
=
_
(
"User"
)
app_label
=
"userprofile"
permissions
=
(
(
"can_edit_users"
,
"Can edit users"
,),
)
def
__str__
(
self
):
"""Returns user username"""
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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