[obs-commits] [openSUSE/open-build-service] b12cc1: [frontend] Add User#can_modify? method
Branch: refs/heads/master Home: https://github.com/openSUSE/open-build-service Commit: b12cc13cfaa23c0a017b4da1c0d2ca22916425c9 https://github.com/openSUSE/open-build-service/commit/b12cc13cfaa23c0a017b4d... Author: Björn Geuken <bgeuken@suse.de> Date: 2018-06-28 (Thu, 28 Jun 2018) Changed paths: M src/api/app/models/user.rb Log Message: ----------- [frontend] Add User#can_modify? method We have a couple of code pathes in OBS that operate on both, projects and packages. So we end up many times having to check whether we have to run a permission check on an a project or package. This commit adds a method that calls can_modify_package? or can_modify_project? depending on the given object class. Commit: 9b5798351278a7a850a14b50b6aa14419e73b35f https://github.com/openSUSE/open-build-service/commit/9b5798351278a7a850a14b... Author: Björn Geuken <bgeuken@suse.de> Date: 2018-06-28 (Thu, 28 Jun 2018) Changed paths: M src/api/app/controllers/source_controller.rb M src/api/app/controllers/source_project_config_controller.rb M src/api/app/controllers/source_project_controller.rb M src/api/app/controllers/source_project_meta_controller.rb M src/api/app/controllers/trigger_controller.rb M src/api/app/controllers/webui/package_controller.rb M src/api/app/helpers/webui/project_helper.rb M src/api/app/models/branch_package.rb M src/api/app/models/bs_request.rb M src/api/app/models/bs_request_action.rb M src/api/app/models/bs_request_action_maintenance_release.rb M src/api/app/models/bs_request_action_submit.rb M src/api/app/models/bs_request_permission_check.rb M src/api/app/models/package.rb M src/api/app/models/project.rb M src/api/app/models/service.rb M src/api/app/policies/kiwi/image_policy.rb M src/api/app/policies/package_policy.rb M src/api/app/policies/project_policy.rb M src/api/app/views/shared/_involved_users.html.haml M src/api/app/views/webui/package/_files_view.html.erb M src/api/app/views/webui/package/binaries.html.erb M src/api/app/views/webui/package/meta.html.erb M src/api/app/views/webui/package/show.html.erb M src/api/app/views/webui/patchinfo/show.html.haml M src/api/app/views/webui/project/_packages_table.html.erb M src/api/app/views/webui/project/maintained_projects.html.erb M src/api/app/views/webui/project/meta.html.erb M src/api/app/views/webui/project/prjconf.html.erb M src/api/app/views/webui/project/show.html.erb M src/api/app/views/webui/project/status.html.erb M src/api/app/views/webui/project/subprojects.html.haml M src/api/app/views/webui/repositories/_repository_entry.html.haml M src/api/app/views/webui/repositories/index.html.haml M src/api/lib/opensuse/permission.rb Log Message: ----------- [frontend] Replace can_modify_*? methods with User#can_modify? Replaces can_modify_package? and can_modify_project? methods with User#can_modify?. Commit: 97c48e23b02bc05099b6cca7ac4d31dfb89b9a08 https://github.com/openSUSE/open-build-service/commit/97c48e23b02bc05099b6cc... Author: Björn Geuken <bgeuken@suse.de> Date: 2018-06-28 (Thu, 28 Jun 2018) Changed paths: M src/api/app/views/shared/_involved_users.html.haml Log Message: ----------- [frontend] Refactor involved_users partial by using can_modify? helper Commit: 84517f8a73ed0648e4403122de268f7d4301dc60 https://github.com/openSUSE/open-build-service/commit/84517f8a73ed0648e44031... Author: Björn Geuken <bgeuken@suse.de> Date: 2018-06-28 (Thu, 28 Jun 2018) Changed paths: M src/api/app/controllers/source_controller.rb M src/api/app/controllers/source_project_config_controller.rb M src/api/app/controllers/source_project_controller.rb M src/api/app/controllers/source_project_meta_controller.rb M src/api/app/controllers/trigger_controller.rb M src/api/app/controllers/webui/package_controller.rb M src/api/app/helpers/webui/project_helper.rb M src/api/app/models/branch_package.rb M src/api/app/models/bs_request.rb M src/api/app/models/bs_request_action.rb M src/api/app/models/bs_request_action_maintenance_release.rb M src/api/app/models/bs_request_action_submit.rb M src/api/app/models/bs_request_permission_check.rb M src/api/app/models/package.rb M src/api/app/models/project.rb M src/api/app/models/service.rb M src/api/app/models/user.rb M src/api/app/policies/kiwi/image_policy.rb M src/api/app/policies/package_policy.rb M src/api/app/policies/project_policy.rb M src/api/app/views/shared/_involved_users.html.haml M src/api/app/views/webui/package/_files_view.html.erb M src/api/app/views/webui/package/binaries.html.erb M src/api/app/views/webui/package/meta.html.erb M src/api/app/views/webui/package/show.html.erb M src/api/app/views/webui/patchinfo/show.html.haml M src/api/app/views/webui/project/_packages_table.html.erb M src/api/app/views/webui/project/maintained_projects.html.erb M src/api/app/views/webui/project/meta.html.erb M src/api/app/views/webui/project/prjconf.html.erb M src/api/app/views/webui/project/show.html.erb M src/api/app/views/webui/project/status.html.erb M src/api/app/views/webui/project/subprojects.html.haml M src/api/app/views/webui/repositories/_repository_entry.html.haml M src/api/app/views/webui/repositories/index.html.haml M src/api/lib/opensuse/permission.rb Log Message: ----------- Merge pull request #5247 from bgeuken/add_wrapper_for_can_modify_methods Add wrapper for can modify methods Compare: https://github.com/openSUSE/open-build-service/compare/96850a7fde04...84517f... **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.
participants (1)
-
Björn Geuken