Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Commits
8e815950
Commit
8e815950
authored
3 years ago
by
Martin Mareš
Committed by
Jan Prachař
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Oprava formuláře na přidávání rolí
Rozbil se přechodem na mo_fields.
parent
a029e6b4
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
mo/web/org_users.py
+3
-4
3 additions, 4 deletions
mo/web/org_users.py
with
3 additions
and
4 deletions
mo/web/org_users.py
+
3
−
4
View file @
8e815950
from
typing
import
Optional
,
Lis
t
from
typing
import
Optional
,
Se
t
from
flask
import
render_template
,
g
,
redirect
,
url_for
,
flash
,
request
from
flask_wtf
import
FlaskForm
import
werkzeug.exceptions
...
...
@@ -283,13 +283,12 @@ def org_org(id: int):
form_add_role
.
populate_obj
(
new_role
)
new_role
.
user_id
=
id
new_role
.
place
=
db
.
get_root_place
()
assert
form_add_role
.
place
new_role
.
place
=
form_add_role
.
place
.
place
or
db
.
get_root_place
()
new_role
.
assigned_by
=
g
.
user
.
user_id
ok
=
True
new_role
.
place
=
form_add_role
.
place
.
place
if
not
g
.
gatekeeper
.
can_set_role
(
new_role
):
role_errors
.
append
(
f
'
Roli
"
{
new_role
}
"
nelze přidělit, není podmnožinou žádné vaší role
'
)
ok
=
False
...
...
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