[obs-commits] [openSUSE/open-build-service] ae13ca: [api][webui] avoid wrong usage of User.can_modify_...
Branch: refs/heads/master Home: https://github.com/openSUSE/open-build-service Commit: ae13cabf7b717a7191d67b9714faa27f00c69e9f https://github.com/openSUSE/open-build-service/commit/ae13cabf7b717a7191d67b... Author: Adrian Schröter <adrian@suse.de> Date: 2015-11-02 (Mon, 02 Nov 2015) Changed paths: M src/api/app/models/user.rb Log Message: ----------- [api][webui] avoid wrong usage of User.can_modify_project? can_modify_project? must not be used on non-stored projects. We check only at store time creation permissions, so we would just skip them here. There is a convenience method in Project.check_write_access(!) to call the right check depending on if a project got created already or not. Raise an error, when this is not done right. Fixes obs#1291 Commit: c4537ee95bddb34713af517e415b5ac90278165a https://github.com/openSUSE/open-build-service/commit/c4537ee95bddb34713af51... Author: Moisés Déniz Alemán <mdeniz@users.noreply.github.com> Date: 2015-11-30 (Mon, 30 Nov 2015) Changed paths: M src/api/app/models/user.rb Log Message: ----------- Merge pull request #1328 from adrianschroeter/avoid_illegal_usage_of_can_modify [api][webui] avoid wrong usage of User.can_modify_project? We agree that is a solution for now. Compare: https://github.com/openSUSE/open-build-service/compare/eba5104d0f99...c4537e...
participants (1)
-
Moisés Déniz Alemán