Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
233
Issues
233
List
Boards
Labels
Service Desk
Milestones
Merge Requests
36
Merge Requests
36
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
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
a6a7ecfc
Commit
a6a7ecfc
authored
34 minutes ago
by
Marcelo Rivera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fix): if entities are provided, don't rehydrate them
parent
f4602932
chore-refactor-permissions-export
1 merge request
!349
Chore refactor permissions export
Pipeline
#86338216
failed with stages
in 4 minutes and 39 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
Core/Permissions/Manager.php
Core/Permissions/Manager.php
+9
-4
No files found.
Core/Permissions/Manager.php
View file @
a6a7ecfc
...
...
@@ -40,12 +40,17 @@ class Manager
'entities'
=>
[],
],
$opts
);
$guids
=
$opts
[
'guids'
]
?:
array_map
(
function
(
$item
)
{
return
$item
->
getGuid
(
);
}
,
$opts
[
'entities'
]);
if
(
$opts
[
'user_guid'
]
===
null
)
{
throw
new
\InvalidArgumentException
(
'user_guid is required'
);
}
$user
=
$this
->
entitiesBuilder
->
single
(
$opts
[
'user_guid'
]);
$entities
=
$this
->
entitiesBuilder
->
get
([
'guids'
=>
$guids
]);
if
(
!
$user
)
{
throw
new
\InvalidArgumentException
(
'User does not exist'
);
}
$entities
=
$opts
[
'entities'
]
??
$this
->
entitiesBuilder
->
get
([
'guids'
=>
$opts
[
'guids'
]]);
if
(
$user
&&
$user
->
getType
()
!==
'user'
)
{
throw
new
\InvalidArgumentException
(
'Entity is not a user'
);
...
...
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