Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project
Project
Details
Activity
Releases
Dependency List
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
168
Issues
168
List
Boards
Labels
Service Desk
Milestones
Merge Requests
46
Merge Requests
46
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
bbf37414
Commit
bbf37414
authored
1 hour ago
by
Brian Hatchet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extending feature flag false by default to the engine
parent
00de930b
feat/disable-comments-526
1 merge request
!255
(feat) Disabling comments 526
Pipeline
#71102478
passed with stages
in 8 minutes and 55 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
Manager.php
Core/Features/Manager.php
+2
-2
ManagerSpec.php
Spec/Core/Features/ManagerSpec.php
+2
-2
No files found.
Core/Features/Manager.php
View file @
bbf37414
...
...
@@ -45,9 +45,9 @@ class Manager
$features
=
$this
->
config
->
get
(
'features'
)
?:
[];
if
(
!
isset
(
$features
[
$feature
]))
{
error_log
(
"[Features\Manager] Feature '
{
$feature
}
' is not declared. Assuming
tru
e."
);
error_log
(
"[Features\Manager] Feature '
{
$feature
}
' is not declared. Assuming
fals
e."
);
return
tru
e
;
return
fals
e
;
}
if
(
$features
[
$feature
]
===
'admin'
&&
$this
->
user
->
isAdmin
())
{
...
...
This diff is collapsed.
Click to expand it.
Spec/Core/Features/ManagerSpec.php
View file @
bbf37414
...
...
@@ -24,13 +24,13 @@ class ManagerSpec extends ObjectBehavior
$this
->
shouldHaveType
(
Manager
::
class
);
}
function
it_should_check_if_a_feature_exists_unsuccessfully_and_assume_its_active
()
function
it_should_check_if_a_feature_exists_unsuccessfully_and_assume_its_
in
active
()
{
$this
->
config
->
get
(
'features'
)
->
shouldBeCalled
()
->
willReturn
([
'plus'
=>
true
,
'wire'
=>
false
]);
$this
->
has
(
'boost'
)
->
shouldReturn
(
tru
e
);
$this
->
has
(
'boost'
)
->
shouldReturn
(
fals
e
);
}
function
it_should_check_if_a_feature_exists_and_return_its_deactivated
()
...
...
This diff is collapsed.
Click to expand it.
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