[Rt-commit] rt branch, 4.2/article-ui-and-cf-rights, created. rt-4.1.8-506-g66be79f
Alex Vandiver
alexmv at bestpractical.com
Tue May 28 20:13:31 EDT 2013
The branch, 4.2/article-ui-and-cf-rights has been created
at 66be79f7d14e7d34b8c15da42546809c442ea159 (commit)
- Log -----------------------------------------------------------------
commit dfc910705ea9c8c758526dfc27c2e2593f02d9f9
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue May 28 19:28:25 2013 -0400
Hide a couple other bits of Articles UI based on the ShowArticlesMenu right
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 424c0e6..c7bdba8 100644
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -493,7 +493,8 @@ my $build_main_nav = sub {
$tickets->child( simple => title => loc('Simple Search'), path => "/Search/Simple.html" );
$tickets->child( new => title => loc('New Search'), path => "/Search/Build.html?NewQuery=1" );
- $search->child( articles => title => loc('Articles'), path => "/Articles/Article/Search.html" );
+ $search->child( articles => title => loc('Articles'), path => "/Articles/Article/Search.html" )
+ if $session{CurrentUser}->HasRight( Right => 'ShowArticlesMenu', Object => RT->System );
$search->child( users => title => loc('Users'), path => "/User/Search.html" );
@@ -701,7 +702,7 @@ my $build_main_nav = sub {
$actions->child( 'extract-article' =>
title => loc('Extract Article'),
path => "/Articles/Article/ExtractIntoClass.html?Ticket=".$obj->id,
- );
+ ) if $session{CurrentUser}->HasRight( Right => 'ShowArticlesMenu', Object => RT->System );
if ( defined $session{"tickets"} ) {
# we have to update session data if we get new ItemMap
commit 66be79f7d14e7d34b8c15da42546809c442ea159
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue May 28 19:28:33 2013 -0400
Allow SeeCustomField and ModifyCustomField rights at the Class level
The code already supports checking the context object (here, the Class),
and the context objects are set in RT::Class->ArticleCustomFields.
Support this orthogonal manner of granting rights, which is many times
superior to attempting to set them on every CF individually.
diff --git a/lib/RT/Class.pm b/lib/RT/Class.pm
index e94ff31..a80d024 100644
--- a/lib/RT/Class.pm
+++ b/lib/RT/Class.pm
@@ -88,8 +88,10 @@ __PACKAGE__->AddRight( Staff => SeeClass => 'See that this class ex
__PACKAGE__->AddRight( Staff => CreateArticle => 'Create articles in this class'); # loc_pair
__PACKAGE__->AddRight( General => ShowArticle => 'See articles in this class'); # loc_pair
__PACKAGE__->AddRight( Staff => ShowArticleHistory => 'See changes to articles in this class'); # loc_pair
+__PACKAGE__->AddRight( General => SeeCustomField => 'View custom field values' ); # loc_pair
__PACKAGE__->AddRight( Staff => ModifyArticle => 'Modify or delete articles in this class'); # loc_pair
__PACKAGE__->AddRight( Staff => ModifyArticleTopics => 'Modify topics for articles in this class'); # loc_pair
+__PACKAGE__->AddRight( Staff => ModifyCustomField => 'Modify custom field values' ); # loc_pair
__PACKAGE__->AddRight( Admin => AdminClass => 'Modify metadata and custom fields for this class'); # loc_pair
__PACKAGE__->AddRight( Admin => AdminTopics => 'Modify topic hierarchy associated with this class'); # loc_pair
__PACKAGE__->AddRight( Admin => ShowACL => 'Display Access Control List'); # loc_pair
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list