diff options
author | Rémy Coutable <remy@rymai.me> | 2018-08-24 23:54:13 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-08-24 23:54:13 +0300 |
commit | 71ba763adb558b6cece831489bfc37918751cc63 (patch) | |
tree | d46ed4e3c212e1e256e83a3243d15e94833cfd76 /app/helpers | |
parent | 452fd703f322370e6bf12a4f243e258db7e278f5 (diff) | |
parent | a765934b3c9b04d45d5c194cb01817bba5e0bf57 (diff) |
Merge branch 'dz-refactor-project-permissions-helper-method' into 'master'
Refactor project_permissions_panel_data so it can be extended in EE easily
See merge request gitlab-org/gitlab-ce!21370
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/projects_helper.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 6b4079b4113..18b3badda8d 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -447,7 +447,7 @@ module ProjectsHelper end def project_permissions_panel_data(project) - data = { + { currentSettings: project_permissions_settings(project), canChangeVisibilityLevel: can_change_visibility_level?(project, current_user), allowedVisibilityOptions: project_allowed_visibility_levels(project), @@ -457,8 +457,10 @@ module ProjectsHelper lfsAvailable: Gitlab.config.lfs.enabled, lfsHelpPath: help_page_path('workflow/lfs/manage_large_binaries_with_git_lfs') } + end - data.to_json.html_safe + def project_permissions_panel_data_json(project) + project_permissions_panel_data(project).to_json.html_safe end def project_allowed_visibility_levels(project) |