Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7816716c
Commit
7816716c
authored
Sep 24, 2020
by
Adam Hegyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove inactive_policy_condition feature flag
parent
ff29fcb0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
29 deletions
+1
-29
app/policies/base_policy.rb
app/policies/base_policy.rb
+1
-4
config/feature_flags/development/inactive_policy_condition.yml
...g/feature_flags/development/inactive_policy_condition.yml
+0
-7
spec/policies/global_policy_spec.rb
spec/policies/global_policy_spec.rb
+0
-18
No files found.
app/policies/base_policy.rb
View file @
7816716c
...
@@ -27,10 +27,7 @@ class BasePolicy < DeclarativePolicy::Base
...
@@ -27,10 +27,7 @@ class BasePolicy < DeclarativePolicy::Base
desc
"User email is unconfirmed or user account is locked"
desc
"User email is unconfirmed or user account is locked"
with_options
scope: :user
,
score:
0
with_options
scope: :user
,
score:
0
condition
(
:inactive
)
do
condition
(
:inactive
)
{
@user
&
.
confirmation_required_on_sign_in?
||
@user
&
.
access_locked?
}
Feature
.
enabled?
(
:inactive_policy_condition
,
default_enabled:
true
)
&&
@user
&
.
confirmation_required_on_sign_in?
||
@user
&
.
access_locked?
end
with_options
scope: :user
,
score:
0
with_options
scope: :user
,
score:
0
condition
(
:external_user
)
{
@user
.
nil?
||
@user
.
external?
}
condition
(
:external_user
)
{
@user
.
nil?
||
@user
.
external?
}
...
...
config/feature_flags/development/inactive_policy_condition.yml
deleted
100644 → 0
View file @
ff29fcb0
---
name
:
inactive_policy_condition
introduced_by_url
:
rollout_issue_url
:
group
:
type
:
development
default_enabled
:
true
spec/policies/global_policy_spec.rb
View file @
7816716c
...
@@ -229,12 +229,6 @@ RSpec.describe GlobalPolicy do
...
@@ -229,12 +229,6 @@ RSpec.describe GlobalPolicy do
it
{
is_expected
.
not_to
be_allowed
(
:access_api
)
}
it
{
is_expected
.
not_to
be_allowed
(
:access_api
)
}
end
end
it
'when `inactive_policy_condition` feature flag is turned off'
do
stub_feature_flags
(
inactive_policy_condition:
false
)
is_expected
.
to
be_allowed
(
:access_api
)
end
end
end
end
end
...
@@ -321,12 +315,6 @@ RSpec.describe GlobalPolicy do
...
@@ -321,12 +315,6 @@ RSpec.describe GlobalPolicy do
end
end
it
{
is_expected
.
not_to
be_allowed
(
:access_git
)
}
it
{
is_expected
.
not_to
be_allowed
(
:access_git
)
}
it
'when `inactive_policy_condition` feature flag is turned off'
do
stub_feature_flags
(
inactive_policy_condition:
false
)
is_expected
.
to
be_allowed
(
:access_git
)
end
end
end
context
'when terms are enforced'
do
context
'when terms are enforced'
do
...
@@ -403,12 +391,6 @@ RSpec.describe GlobalPolicy do
...
@@ -403,12 +391,6 @@ RSpec.describe GlobalPolicy do
end
end
it
{
is_expected
.
not_to
be_allowed
(
:use_slash_commands
)
}
it
{
is_expected
.
not_to
be_allowed
(
:use_slash_commands
)
}
it
'when `inactive_policy_condition` feature flag is turned off'
do
stub_feature_flags
(
inactive_policy_condition:
false
)
is_expected
.
to
be_allowed
(
:use_slash_commands
)
end
end
end
context
'when access locked'
do
context
'when access locked'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment