Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
registration-3468752
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
registration-3468752
Commits
87ab6594
Commit
87ab6594
authored
12 years ago
by
Lev Tsypin
Browse files
Options
Downloads
Patches
Plain Diff
#1616944
: Add permission to manage own registration type settings.
parent
fc0ff8c4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
registration.module
+9
-2
9 additions, 2 deletions
registration.module
with
9 additions
and
2 deletions
registration.module
+
9
−
2
View file @
87ab6594
...
...
@@ -244,6 +244,10 @@ function registration_permission_list($info) {
'title'
=>
t
(
'%type_name: Administer settings'
,
array
(
'%type_name'
=>
$label
)),
'description'
=>
t
(
'Allow changing registration settings for entities with this type.'
),
),
"administer own
$type
registration"
=>
array
(
'title'
=>
t
(
'%type_name: Administer own settings'
,
array
(
'%type_name'
=>
$label
)),
'description'
=>
t
(
'Allow changing registration settings for entities with this type authored by the given user.'
),
),
"view
$type
registration"
=>
array
(
'title'
=>
t
(
'%type_name: View all registrations'
,
array
(
'%type_name'
=>
$label
)),
),
...
...
@@ -355,11 +359,14 @@ function registration_register_page_access($entity_type, $entity) {
*/
function
registration_administer_registrations_access
(
$entity_type
,
$entity
)
{
$registration_type
=
registration_get_entity_registration_type
(
$entity_type
,
$entity
);
$ret
=
FALSE
;
if
(
$registration_type
)
{
return
user_access
(
"administer
$registration_type
registration"
);
if
(
!
$ret
=
user_access
(
"administer
$registration_type
registration"
))
{
$ret
=
user_access
(
"administer own
$registration_type
registration"
);
}
}
return
FALSE
;
return
$ret
;
}
/**
...
...
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