Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
9f27285b
Commit
9f27285b
authored
Jul 12, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new privileges to manager
parent
b7592f5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
docs/admin.rst
docs/admin.rst
+2
-0
weblate/accounts/models.py
weblate/accounts/models.py
+6
-1
No files found.
docs/admin.rst
View file @
9f27285b
...
...
@@ -158,6 +158,8 @@ Weblate uses privileges system based on Django. It defines following extra privi
* Can update translation from git [Managers]
* Can push translations to remote git [Managers]
* Can do automatic translation using other project strings [Managers]
* Can lock whole translation project [Managers]
* Can reset translations to match remote git [Managers]
* Can save translation [Users, Managers]
* Can accept suggestion [Users, Managers]
* Can accept suggestion [Users, Managers]
...
...
weblate/accounts/models.py
View file @
9f27285b
...
...
@@ -9,6 +9,8 @@ from django.contrib import messages
from
django.contrib.auth.models
import
Group
,
Permission
,
User
from
django.db.models.signals
import
post_syncdb
from
south.signals
import
post_migrate
from
weblate.lang.models
import
Language
class
Profile
(
models
.
Model
):
...
...
@@ -113,6 +115,8 @@ def create_groups(update, move):
Permission
.
objects
.
get
(
codename
=
'add_dictionary'
),
Permission
.
objects
.
get
(
codename
=
'change_dictionary'
),
Permission
.
objects
.
get
(
codename
=
'delete_dictionary'
),
Permission
.
objects
.
get
(
codename
=
'lock_translation'
),
Permission
.
objects
.
get
(
codename
=
'reset_translation'
),
)
if
move
:
for
u
in
User
.
objects
.
all
():
...
...
@@ -122,7 +126,8 @@ def sync_create_groups(sender, **kwargs):
'''
Create groups on syncdb.
'''
if
sender
.
__name__
==
'weblate.accounts.models'
:
if
(
'app'
in
kwargs
and
kwargs
[
'app'
]
==
'accounts'
)
or
(
sender
is
not
None
and
sender
.
__name__
==
'weblate.accounts.models'
)
:
create_groups
(
False
,
False
)
post_syncdb
.
connect
(
sync_create_groups
)
post_migrate
.
connect
(
sync_create_groups
)
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