Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Tezor
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
AlekSIS®
Onboarding
AlekSIS-App-Tezor
Merge requests
!3
Implement payment backends and interaction
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Implement payment backends and interaction
payment-backends
into
master
Overview
0
Commits
26
Pipelines
17
Changes
9
Merged
Nik | Klampfradler
requested to merge
payment-backends
into
master
3 years ago
Overview
0
Commits
26
Pipelines
17
Changes
2
Expand
Advances
#3 (closed)
Edited
3 years ago
by
Tom Teichler
0
0
Merge request reports
Compare
version 10
version 16
74877fb4
3 years ago
version 15
df3156a3
3 years ago
version 14
9d5664c1
3 years ago
version 13
37188643
3 years ago
version 12
313ce336
3 years ago
version 11
9b92d753
3 years ago
version 10
c28f5258
3 years ago
version 9
99346f3c
3 years ago
version 8
96a3105e
3 years ago
version 7
6d7d6ff1
3 years ago
version 6
8f0bed49
3 years ago
version 5
c0636c56
3 years ago
version 4
147a864f
3 years ago
version 3
4920026b
3 years ago
version 2
8020b76a
3 years ago
version 1
7602f026
3 years ago
master (base)
and
version 11
latest version
e9498e70
26 commits,
3 years ago
version 16
74877fb4
15 commits,
3 years ago
version 15
df3156a3
14 commits,
3 years ago
version 14
9d5664c1
13 commits,
3 years ago
version 13
37188643
12 commits,
3 years ago
version 12
313ce336
11 commits,
3 years ago
version 11
9b92d753
9 commits,
3 years ago
version 10
c28f5258
8 commits,
3 years ago
version 9
99346f3c
7 commits,
3 years ago
version 8
96a3105e
6 commits,
3 years ago
version 7
6d7d6ff1
5 commits,
3 years ago
version 6
8f0bed49
4 commits,
3 years ago
version 5
c0636c56
3 commits,
3 years ago
version 4
147a864f
2 commits,
3 years ago
version 3
4920026b
2 commits,
3 years ago
version 2
8020b76a
1 commit,
3 years ago
version 1
7602f026
1 commit,
3 years ago
Show latest version
2 files
+
82
−
10
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
aleksis/apps/tezor/rules.py
0 → 100644
+
72
−
0
Options
import
rules
from
.models.base
import
Client
from
.models.invoice
import
Invoice
,
InvoiceGroup
from
aleksis.core.util.predicates
import
has_person
,
has_global_perm
,
has_any_object
,
has_object_perm
# View clients
view_clients_predicate
=
has_person
&
(
has_global_perm
(
"
tezor.view_client
"
)
|
has_any_object
(
"
tezor.view_client
"
,
Client
)
)
rules
.
add_perm
(
"
tezor.view_clients_rule
"
,
view_clients_predicate
)
# View client
view_client_predicate
=
has_person
&
(
has_global_perm
(
"
tezor.view_client
"
)
|
has_object_perm
(
"
tezor.view_client
"
)
)
rules
.
add_perm
(
"
tezor.view_client_rule
"
,
view_client_predicate
)
# Edit clients
edit_client_predicate
=
has_person
&
(
has_global_perm
(
"
tezor.edit_client
"
)
|
has_object_perm
(
"
tezor.edit_client
"
)
)
rules
.
add_perm
(
"
tezor.edit_client_rule
"
,
edit_client_predicate
)
# Create clients
create_client_predicate
=
has_person
&
(
has_global_perm
(
"
tezor.create_client
"
)
|
has_any_object
(
"
tezor.create_client
"
,
Client
)
)
rules
.
add_perm
(
"
tezor.create_client_rule
"
,
create_client_predicate
)
# Delete clients
delete_client_predicate
=
has_person
&
(
has_global_perm
(
"
tezor.delete_client
"
)
|
has_object_perm
(
"
tezor.delete_client
"
)
)
rules
.
add_perm
(
"
tezor.delete_client_rule
"
,
delete_client_predicate
)
# View invoice groups
view_invoice_groups_predicate
=
has_person
&
(
has_global_perm
(
"
tezor.view_invoice_group
"
)
|
has_any_object
(
"
tezor.view_invoice_group
"
,
InvoiceGroup
)
)
rules
.
add_perm
(
"
tezor.view_invoice_groups_rule
"
,
view_invoice_groups_predicate
)
# View invoice_group
view_invoice_group_predicate
=
has_person
&
(
has_global_perm
(
"
tezor.view_invoice_group
"
)
|
has_object_perm
(
"
tezor.view_invoice_group
"
)
)
rules
.
add_perm
(
"
tezor.view_invoice_group_rule
"
,
view_invoice_group_predicate
)
# Edit invoice groups
edit_invoice_group_predicate
=
has_person
&
(
has_global_perm
(
"
tezor.edit_invoice_group
"
)
|
has_object_perm
(
"
tezor.edit_invoice_group
"
)
)
rules
.
add_perm
(
"
tezor.edit_invoice_group_rule
"
,
edit_invoice_group_predicate
)
# Create invoice groups
create_invoice_groups_predicate
=
has_person
&
(
has_global_perm
(
"
tezor.create_invoice_group
"
)
|
has_any_object
(
"
tezor.create_invoice_group
"
,
InvoiceGroup
)
)
rules
.
add_perm
(
"
tezor.create_invoice_groups_rule
"
,
create_invoice_groups_predicate
)
# Delete invoice groups
delete_invoice_groups_predicate
=
has_person
&
(
has_global_perm
(
"
tezor.delete_invoice_group
"
)
|
has_any_object
(
"
tezor.delete_invoice_group
"
,
InvoiceGroup
)
)
rules
.
add_perm
(
"
tezor.delete_invoice_groups_rule
"
,
delete_invoice_groups_predicate
)
# View invoice
view_invoice_predicate
=
has_person
&
(
has_global_perm
(
"
tezor.view_invoice
"
)
|
has_object_perm
(
"
tezor.view_invoice
"
)
)
rules
.
add_perm
(
"
tezor.view_invoice_rule
"
,
view_invoice_predicate
)
Loading