Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Public contract registry
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Public contract registry
Commits
8b8886b2
Commit
8b8886b2
authored
2 years ago
by
Tomáš Valenta
Browse files
Options
Downloads
Patches
Plain Diff
multiple default staff groups
parent
405144b2
No related branches found
No related tags found
No related merge requests found
Pipeline
#12303
passed
2 years ago
Stage: build
Stage: test_deploy
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Dockerfile
+1
-1
1 addition, 1 deletion
Dockerfile
env.example
+1
-1
1 addition, 1 deletion
env.example
registry/settings/base.py
+1
-1
1 addition, 1 deletion
registry/settings/base.py
users/models.py
+1
-1
1 addition, 1 deletion
users/models.py
with
4 additions
and
4 deletions
Dockerfile
+
1
−
1
View file @
8b8886b2
...
...
@@ -28,7 +28,7 @@ RUN DATABASE_URL=postgres://x/x \
DEFAULT_CONTRACTEE_ZIP
=
x
\
DEFAULT_CONTRACTEE_DISTRICT
=
x
\
DEFAULT_CONTRACTEE_ICO_NUMBER
=
x
\
DEFAULT_STAFF_GROUP
=
x
\
DEFAULT_STAFF_GROUP
S
=
x
\
python manage.py collectstatic
--noinput
--settings
=
registry.settings.production
RUN
bash
-c
"adduser --disabled-login --quiet --gecos app app &&
\
...
...
This diff is collapsed.
Click to expand it.
env.example
+
1
−
1
View file @
8b8886b2
...
...
@@ -19,4 +19,4 @@ DEFAULT_CONTRACTEE_ZIP="128 00"
DEFAULT_CONTRACTEE_DISTRICT="Praha 2"
DEFAULT_CONTRACTEE_ICO_NUMBER="71339698"
DEFAULT_STAFF_GROUP="sso_cen:f"
DEFAULT_STAFF_GROUP="sso_cen:f
,sso_cen:neverejni,sso_cen:smlouvy_ao,sso_cen:registr_smluv
"
This diff is collapsed.
Click to expand it.
registry/settings/base.py
+
1
−
1
View file @
8b8886b2
...
...
@@ -232,4 +232,4 @@ DEFAULT_CONTRACTEE_DISTRICT = env.str("DEFAULT_CONTRACTEE_DISTRICT")
DEFAULT_COUNTRY
=
env
.
str
(
"
DEFAULT_COUNTRY
"
)
DEFAULT_CONTRACTEE_ICO_NUMBER
=
env
.
str
(
"
DEFAULT_CONTRACTEE_ICO_NUMBER
"
)
DEFAULT_STAFF_GROUP
=
env
.
st
r
(
"
DEFAULT_STAFF_GROUP
"
)
DEFAULT_STAFF_GROUP
S
=
env
.
li
st
(
"
DEFAULT_STAFF_GROUP
S
"
)
This diff is collapsed.
Click to expand it.
users/models.py
+
1
−
1
View file @
8b8886b2
...
...
@@ -109,7 +109,7 @@ class User(pirates_models.AbstractUser):
self
.
is_staff_based_on_group
=
True
is_staff
=
self
.
groups
.
filter
(
name
=
settings
.
DEFAULT_STAFF_GROUP
).
exists
()
is_staff
=
self
.
groups
.
filter
(
name
__in
=
settings
.
DEFAULT_STAFF_GROUP
S
).
exists
()
changes_made
=
False
if
is_staff
is
not
self
.
is_staff
:
...
...
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