プロジェクト

全般

プロフィール

Vote #63235

完了

New Permission: Edit own issues

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Permissions and roles_17
対象バージョン:
開始日:
2008/05/16
期日:
進捗率:

0%

予定工数:
category_id:
17
version_id:
127
issue_org_id:
1248
author_id:
935
assigned_to_id:
332
comments:
51
status_id:
5
tracker_id:
2
plus1:
27
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

  • Today (as in version 0.7.1):
    ** We may only grant/revoke a role the permission to edit any issues ("Edit issues" permission).

  • Suggestion / Request:
    ** It would be nice to be able to grant/revoke a role the permission to "Edit own issues".


journals

+1
--------------------------------------------------------------------------------
+1. Empowering users to modify their own request can reduce the load on the people processing requests.
--------------------------------------------------------------------------------
+1 This may reduce count of misspelled or invalid bug. Because user may do mistake on filling bug.

--------------------------------------------------------------------------------
I have a patch for this against recent trunk, attached. We are having this problem in a big way at an installation of mostly native Japanese speakers; with Asian languages, you're always hitting return to do Kanji conversion of your input and one extra carriage return means a half-baked issue in the tracker!

h2. New Permissions

I addressed this by creating two new permissions that can be assigned to roles:
* edit_own_issues allows users with that permission to edit issues they created (i.e., whose author field is equal to the current user). This addresses the problem, but is potentially a big workflow change, so not all sites might want it.
* edit_own_new_issues is a more limited permission that allows a user to edit their own issues if there are no journals yet, or if all existing journals were created by the author. I think this is really the pinpoint solution to the problem; as far as I know, all edits will create a journal, so this lets you edit your issue until the moment someone else pays attention to it.
** Because it seems like such a contained right, in the patch I added it to the default permissions for the Reporter role.

h2. Implementation

To implement the above, I created a new editable? predicate on the issue model parallel to the visible? predicate that was already there (this also seems like a pretty good pattern to follow in general). Then, I changed the code that was doing
@ User.current.allowed_to?(:edit_issues, @project)@
to just call
@ issue.editable?@
instead.

I updated the English and Japanese locales as well.

The patch file was formatted with git format-patch; is that the preferred patch format? Specifically, the patch was generated against svn+ssh://rubyforge.org/var/svn/redmine/trunk@4175 e93f8b46-1217.

I'm fairly new to Redmine and Ruby, so it would definitely be good to get other eyes on this patch. I'll be able to get in some more testing next week. My configuration is:

<pre>
bash-3.2$ RAILS_ENV=production ruby script/about
About your application's environment
Ruby version 1.8.7 (universal-darwin10.0)
RubyGems version 1.3.5
Rack version 1.0
Rails version 2.3.5
Active Record version 2.3.5
Active Resource version 2.3.5
Action Mailer version 2.3.5
Active Support version 2.3.5
Application root /Users/leo/OpenSrcSources/redmine
Environment production
Database adapter mysql
Database schema version 20100819172912
</pre>

--------------------------------------------------------------------------------
I also applied this patch on our production redmine at work (Redmine 1.0.1 release on CentOS 5.2).

--------------------------------------------------------------------------------
+1 - this should go in the trunk.
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
Created patch issue to follow the progression of my patch to add this feature and other issue edit permission improvements. Please add relation to #7444.
--------------------------------------------------------------------------------
Is there any approved way to urge this get moved to trunk? I need to apply this on every Redmine instance we use, I think any installation with real scale of users is unmanageable without something like this.

Brian: I don't seem to have permissions to add the relation.

--------------------------------------------------------------------------------
Leo: Issue relations in Redmine are controlled by a different permission: 'Manage issue relations'. I can see a situation where project managers/software leads would not want issue reporters to have the ability to set up relations. Perhaps another permission should be added: 'Manage own issue relations'?
--------------------------------------------------------------------------------
Leo: Hah! Just realized that you were saying that you don't have the permissions to relate this issue to my patch issue #7444.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
+1 also.

It should be interesting to add this parameter.
--------------------------------------------------------------------------------
It's also wise to have a "time limit" to help people not trying to modify something made a year ago, for example. As we will never find a good for everyone value, it's good to have it configurable, some values as suggestion:

* Limit own issue editing and own issue comments:
** Custom (please specify)
** 30 days
** 15 days
** 7 days
** 3 days
** 24 hours
** 12 hours
** 6 hours
** 3 hours
** less then one hour
** Never
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
This would be an excellent feature to allow our client to edit the mistakes on its own created issues without having us to deal with it through a note left on this same issue by him. +1
--------------------------------------------------------------------------------
+1 - very useful for redmine.org itself
--------------------------------------------------------------------------------
+1 crucial
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
+1 please for 3.0.0
--------------------------------------------------------------------------------
A feature that we should have, please!

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
+1 please
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
+1 - will be very useful
--------------------------------------------------------------------------------
+1 will be usefull
--------------------------------------------------------------------------------
+1 this would be an excellent feature
--------------------------------------------------------------------------------
+1, really need this. "Editing issue" grant ppl to be like an admin ! (and we don't want that, we want "Edit own issue")
--------------------------------------------------------------------------------
+100

I really need this feature. We're planning to use Redmine but the lack of this feature blocks a lot.
--------------------------------------------------------------------------------
+100. We need this permission.
Thank so much!
--------------------------------------------------------------------------------
+100 v 3.1
--------------------------------------------------------------------------------
+100500 It's bad idea to give access to edit all issues for Reporter only for possibility to change Status from Resolved to Closed

--------------------------------------------------------------------------------
Leo Hourvitz's *edit_own_new_issues* is good idea.
*edit_own_issues* is topic of this issue.
*edit assigned issues* is most important for me

In my opinion, "own" is not clear for this mean. Reported or created is more understable ?

--------------------------------------------------------------------------------
+1 to separate "Edit Reported Issues" and "Edit Assigned Issues".
--------------------------------------------------------------------------------
Adnan Topçu wrote:
> Leo Hourvitz's *edit_own_new_issues* is good idea.
> *edit_own_issues* is topic of this issue.
> *edit assigned issues* is most important for me
>
> In my opinion, "own" is not clear for this mean. Reported or created is more understable ?

Owner == Author all accross Redmine, modifying this Redmine convention is out of this issue's scope.
--------------------------------------------------------------------------------
budo kaiman wrote:
> +1 to separate "Edit Reported Issues" and "Edit Assigned Issues".

* In regards to "Edit Reported Issues", please read my comment 40 (#1248#note-40) above;
* If a user belongs to a role with "Issues can be assigned to this role" enabled, having something like "Edit Assigned Issues" is not gonna stop him/her to edit an issue, it is just a matter of assigning the issue to himself/herself and _voila_, now he/she may edit the issue.
--------------------------------------------------------------------------------
Ronie Henrich wrote:
> * If a user belongs to a role with "Issues can be assigned to this role" enabled, having something like "Edit Assigned Issues" is not gonna stop him/her to edit an issue, it is just a matter of assigning the issue to himself/herself and _voila_, now he/she may edit the issue.

That only works if they already have "Edit Issues" permission, if they don't have that permission then they cannot assign an issue to themself, someone else with that permission must assign the issue to them.

Ronie Henrich wrote:
> Owner == Author all accross Redmine, modifying this Redmine convention is out of this issue's scope.

I don't think that there is any scope change, just a wording change as "Author" or "Reporter" is more clear in it's intention.
--------------------------------------------------------------------------------
+1

--------------------------------------------------------------------------------
Yes please, this is an important feature to have!
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
must have feature indeed
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Added "Edit own issues" permission. This permission can edit issues created by you regardless of the presence or absence of a journal.
I attached a patch.

!{width:50%;border:1px solid #ccc}add_permit_edit_own_issues@2x.png!
--------------------------------------------------------------------------------
LGTM. Setting the target version to 4.1.0.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,7444,Patch for improved issue edit permissions
relates,New,5195,edit_own_issues and delete_own_issues permissions
relates,New,29935,Edit authored issues and Edit assigned issues in issue tracking permission
duplicates,Closed,8805,Please consider to make a new permission for "edit _own_ issues"
duplicates,Closed,6194,Edit own issues
duplicates,Closed,4767,Add permission group to allow 'edit your own tickets (header)'.

Admin Redmine さんが約4年前に更新

  • カテゴリPermissions and roles_17 にセット
  • 対象バージョン4.1.0_127 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0