Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Onboarding
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
3lisvequii
Onboarding
Commits
a1f7091c
Commit
a1f7091c
authored
3 years ago
by
Jonathan Weth
Committed by
Nik | Klampfradler
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Rename `create_client_rule`
parent
4d30e080
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/apps/tezor/rules.py
+2
-2
2 additions, 2 deletions
aleksis/apps/tezor/rules.py
aleksis/apps/tezor/views.py
+1
-1
1 addition, 1 deletion
aleksis/apps/tezor/views.py
with
3 additions
and
3 deletions
aleksis/apps/tezor/rules.py
+
2
−
2
View file @
a1f7091c
...
...
@@ -24,10 +24,10 @@ edit_client_predicate = has_person & (
rules
.
add_perm
(
"
tezor.edit_client_rule
"
,
edit_clients_predicate
)
# Create clients
create_client
s
_predicate
=
has_person
&
(
create_client_predicate
=
has_person
&
(
has_global_perm
(
"
tezor.create_client
"
)
|
has_any_object
(
"
tezor.create_client
"
,
Client
)
)
rules
.
add_perm
(
"
tezor.create_client
s
_rule
"
,
create_client
s
_predicate
)
rules
.
add_perm
(
"
tezor.create_client_rule
"
,
create_client_predicate
)
# Delete clients
delete_client_predicate
=
has_person
&
(
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/tezor/views.py
+
1
−
1
View file @
a1f7091c
...
...
@@ -47,7 +47,7 @@ class ClientCreateView(PermissionRequiredMixin, AdvancedCreateView):
model
=
Client
form_class
=
EditClientForm
permission_required
=
"
tezor.create_client
s
_rule
"
permission_required
=
"
tezor.create_client_rule
"
template_name
=
"
tezor/client/create.html
"
success_url
=
reverse_lazy
(
"
clients
"
)
success_message
=
_
(
"
The client has been created.
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment