プロジェクト

全般

プロフィール

Vote #64989

未完了

Estimated hours field able to hide role based

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

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Permissions and roles_17
開始日:
2009/04/01
期日:
進捗率:

0%

予定工数:
category_id:
17
version_id:
32
issue_org_id:
3088
author_id:
3600
assigned_to_id:
0
comments:
22
status_id:
1
tracker_id:
2
plus1:
5
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

adding the option to hide this field to the "roles and permissions" manager


journals

I've got something like this hacked onto my site right now that I can extract and cleanup a bit.
--------------------------------------------------------------------------------
any news?
--------------------------------------------------------------------------------
+1 It would be very good to get this, as we have to hide our estimations from some roles :(
--------------------------------------------------------------------------------
+1 on this one!
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
is covered by #8050
--------------------------------------------------------------------------------
made a plugin for this: http://www.redmine.org/plugins/redmine_hide_estimated_hours
--------------------------------------------------------------------------------
does anybody have version 1.0.0 of this plugin?
--------------------------------------------------------------------------------
Assigned issue with no assignee back to New status.
--------------------------------------------------------------------------------

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

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

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

--------------------------------------------------------------------------------
+1 It would be great to have estimated times integrated in the allover times permissions system.
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
Add "View estimated hours" permission to the "Roles and permissions".

!{width:50%;border:1px solid #ccc;}add_permission_view_estimated_hours.png!

If the project has the "Time tracking" module enabled and the role has "View estimated time" permission enabled, the "Estimated hours" field is available.
I attached a patch.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Now the patch cannot be applied cleanly.
--------------------------------------------------------------------------------
Go MAEDA wrote:
> Now the patch cannot be applied cleanly.

Fixed the patch to work on the current trunk(r19478).
--------------------------------------------------------------------------------
Yuichi HARADA wrote:
> Fixed the patch to work on the current trunk(r19478).

Thank you for the patch. But I am hesitant to make this patch a candidate for 4.2.0. This is because existing users who can currently see estimated hours will lose access to it after applying the patch because view_estimated_hours will not be granted to no roles by default.
--------------------------------------------------------------------------------
Go MAEDA wrote:
> Yuichi HARADA wrote:
> > Fixed the patch to work on the current trunk(r19478).
>
> Thank you for the patch. But I am hesitant to make this patch a candidate for 4.2.0. This is because existing users who can currently see estimated hours will lose access to it after applying the patch because view_estimated_hours will not be granted to no roles by default.

Adding a migration like the following will resolve the above problem.

<pre><code class="diff">
diff --git a/db/migrate/20220315101502_add_view_estimated_hours_to_all_existing_roles.rb b/db/migrate/20220315101502_add_view_estimated_hours_to_all_existing_roles.rb
new file mode 100644
index 000000000..ed2ad47de
--- /dev/null
+++ b/db/migrate/20220315101502_add_view_estimated_hours_to_all_existing_roles.rb
@@ -0,0 +1,9 @@
+class AddViewEstimatedHoursToAllExistingRoles < ActiveRecord::Migration[6.1]
+ def up
+ Role.all.each { |role| role.add_permission! :view_estimated_hours }
+ end
+
+ def down
+ # nothing to revert
+ end
+end
</code></pre>

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


related_issues

relates,Closed,3976,Hide custom fields from certain roles
relates,New,12005,Mightful workflow field enhancement: hide
duplicates,Closed,3781,Add permission to control viewing of Estimated Hours based on Role
duplicates,Closed,15107,Add a permission option to view estimated hours
duplicates,Closed,11963,Hide the estimated times on issues for certain roles

Admin Redmine さんがほぼ4年前に更新

  • カテゴリPermissions and roles_17 にセット
  • 対象バージョンCandidate for next major release_32 にセット

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

いいね!0
いいね!0