File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
config/alfresco/site-webscripts/org/alfresco/components/dashlets Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 10
10
11
11
<div class =" dashlet site-blog-posts" >
12
12
<div class =" title" >${msg("header.siteBlog") } </div >
13
+ <#if userIsSiteContributor >
13
14
<div class =" toolbar" >
14
15
<a id =" ${args.htmlid}-createPost-link" class =" theme-color-1" title =" ${msg('list.createLink')}" href =" ${url.context}/page/site/${page.url.templateArgs.site}/blog-postedit" >${msg("list.createLink") } </a >
15
16
</div >
17
+ </#if >
16
18
<div class =" body scrollableList" id =" ${args.htmlid}-body" <#if args.height?? >style="height: ${args.height} px;"</#if >>
17
19
</div >
18
20
</div >
Original file line number Diff line number Diff line change 1
1
function main ( )
2
2
{
3
+ // Call the repository to see if the user is site manager or not
4
+ var userIsSiteContributor = false ,
5
+ json = remote . call ( "/api/sites/" + page . url . templateArgs . site + "/memberships/" + encodeURIComponent ( user . name ) ) ;
6
+
7
+ if ( json . status == 200 )
8
+ {
9
+ var obj = eval ( '(' + json + ')' ) ;
10
+ if ( obj )
11
+ {
12
+ userIsSiteContributor = ( obj . role == "SiteContributor" || obj . role == "SiteCollaborator" || obj . role == "SiteManager" ) ;
13
+ }
14
+ }
15
+ model . userIsSiteContributor = userIsSiteContributor ;
3
16
}
4
17
5
18
main ( ) ;
You can’t perform that action at this time.
0 commit comments