Restrict Users Role

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

Restrict Users Role

Hi Guys,

In ADF, I want to restrict creating libraries action, only Administrator can create a library. This is what I wrote in app.evaluators.ts, but it does not work well, I have to manually reload it, then it works . Can some correct me? Thanks.

export function canCreateLibrary(
context: RuleContext,
...args: RuleParameter[]
): boolean {

let isAdmin: boolean = false;
if (context.profile ) {
isAdmin = context.profile.isAdmin;
}
console.log("IS Admin" + isAdmin);
return isAdmin;
}
1 Reply
Highlighted
Alfresco Employee

Re: Restrict Users Role

Hi, I suggest you to ask in the content app channel this question is relative to it I guess:

Alfresco/content-app - Gitter