alphanodes / additionals

Redmine plugin for easy customization of settings, text and content display by using personal or role-based dashboards (drag&drop), providing wiki macros and act as library for other plugins.
https://www.redmine.org/plugins/additionals
GNU General Public License v2.0
131 stars 43 forks source link

You forgot about "edit_own_issues" permission #163

Closed qawsed55 closed 1 year ago

qawsed55 commented 1 year ago

Hello, if user have permission edit_own_issues, but permission edit_issues for his role is unset - there are no statuses visible on sidebar.

qawsed55 commented 1 year ago

I have changed from def memberships_new_issue_project_url(user, memberships, permission = :edit_issues) <...> elsif permission == :edit_issues

to def memberships_new_issue_project_url(user, memberships, permission = :edit_issues | :edit_own_issues) <...> elsif permission == :edit_issues | :edit_own_issues

in lib\additionals\helpers.rb

and also here test\functional\issues_controller_test.rb from: User.current.allowed_to?(:edit_issues, @project) && \ to

     User.current.allowed_to?(:edit_issues, @project) | \
     User.current.allowed_to?(:edit_own_issues, @project) && \

and it works ok. I do not know Ruby (and programming) at all, but it seems almost right. As temporary solution I think its ok!

alexandermeindl commented 1 year ago

Hi @qawsed55,

thanks for reporting this! It should be fixed with my last commit in main branch.

alexandermeindl commented 1 year ago

Let me know, if it does not work for you (you can reopen this issue)