Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
ValUnifer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IPIPAN
ValUnifer
Commits
38302ca4
Commit
38302ca4
authored
May 15, 2024
by
dcz
Browse files
Options
Downloads
Patches
Plain Diff
Super can see others fin statements.
parent
0a4145b4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
financial_settlement/views.py
+3
-1
3 additions, 1 deletion
financial_settlement/views.py
with
3 additions
and
1 deletion
financial_settlement/views.py
+
3
−
1
View file @
38302ca4
...
@@ -7,6 +7,7 @@ from financial_settlement.forms import FinStatementForm
...
@@ -7,6 +7,7 @@ from financial_settlement.forms import FinStatementForm
from
financial_settlement.models
import
FinStatement
from
financial_settlement.models
import
FinStatement
from
semantics
import
choices
from
semantics
import
choices
from
semantics.models
import
Frame
from
semantics.models
import
Frame
from
shellvalier
import
settings
from
unifier.models
import
UnifiedFrame2SlowalFrameMapping
,
UnifiedFrame
from
unifier.models
import
UnifiedFrame2SlowalFrameMapping
,
UnifiedFrame
...
@@ -18,9 +19,10 @@ def statement_list(request):
...
@@ -18,9 +19,10 @@ def statement_list(request):
"""
"""
current_user
=
request
.
user
current_user
=
request
.
user
cat_edit_statement
=
current_user
.
has_perm
(
FinStatement
,
'
edit_statement
'
)
cat_edit_statement
=
current_user
.
has_perm
(
FinStatement
,
'
edit_statement
'
)
is_super
=
current_user
.
groups
.
filter
(
name
=
settings
.
SUPER_LEXICOGRAPHS_GROUP_NAME
).
exists
()
statements
=
None
statements
=
None
if
cat_edit_statement
:
if
cat_edit_statement
or
is_super
:
statements
=
FinStatement
.
objects
.
order_by
(
'
statement_id
'
)
statements
=
FinStatement
.
objects
.
order_by
(
'
statement_id
'
)
else
:
else
:
statements
=
FinStatement
.
objects
.
filter
(
user
=
current_user
).
order_by
(
'
statement_id
'
)
statements
=
FinStatement
.
objects
.
filter
(
user
=
current_user
).
order_by
(
'
statement_id
'
)
...
...
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