Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
field_permissions
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
project
field_permissions
Merge requests
!23
Read only fields
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Read only fields
issue/field_permissions-3094098:3094098-provide-form-display
into
8.x-1.x
Overview
5
Commits
6
Pipelines
10
Changes
4
All threads resolved!
Hide all comments
Open
Gaurav Manerkar
requested to merge
issue/field_permissions-3094098:3094098-provide-form-display
into
8.x-1.x
1 year ago
Overview
5
Commits
6
Pipelines
10
Changes
4
All threads resolved!
Hide all comments
Expand
Closes
#3094098
0
0
Merge request reports
Compare
8.x-1.x
version 9
aea05d11
7 months ago
version 8
04e7614b
7 months ago
version 7
ed233b6f
7 months ago
version 6
eb08ee1e
7 months ago
version 5
7676e842
10 months ago
version 4
c0bdbb7c
1 year ago
version 3
7bf58db2
1 year ago
version 2
6a361a21
1 year ago
version 1
8c36b0e7
1 year ago
8.x-1.x (HEAD)
and
latest version
latest version
2e8f1f97
6 commits,
7 months ago
version 9
aea05d11
6 commits,
7 months ago
version 8
04e7614b
6 commits,
7 months ago
version 7
ed233b6f
3 commits,
7 months ago
version 6
eb08ee1e
2 commits,
7 months ago
version 5
7676e842
4 commits,
10 months ago
version 4
c0bdbb7c
3 commits,
1 year ago
version 3
7bf58db2
2 commits,
1 year ago
version 2
6a361a21
1 commit,
1 year ago
version 1
8c36b0e7
1 commit,
1 year ago
4 files
+
88
−
10
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
src/Plugin/FieldPermissionType/CustomAccess.php
+
2
−
2
Options
@@ -31,9 +31,9 @@ class CustomAccess extends Base implements CustomPermissionsInterface, AdminForm
$field_name
=
$this
->
fieldStorage
->
getName
();
if
(
$operation
===
'edit'
&&
$entity
->
isNew
())
{
return
$account
->
hasPermission
(
'create '
.
$field_name
);
return
$account
->
hasPermission
(
'create '
.
$field_name
)
||
$account
->
hasPermission
(
'create read-only '
.
$field_name
);
}
if
(
$account
->
hasPermission
(
$operation
.
' '
.
$field_name
))
{
if
(
$account
->
hasPermission
(
$operation
.
' '
.
$field_name
)
||
$account
->
hasPermission
(
$operation
.
' read-only '
.
$field_name
))
{
return
TRUE
;
}
else
{
Loading