Hello @volkanceylan,
how can I use the HasRole function from PermissionService.cs in my own grid file?
I can use the Authorization.hasPermission but it doesn't check on role (string).
By the way, when I check by this f.or example: if (Authorization.hasPermission("Contracts:General")) then I get an error in firebug: An invalid or illegal string was specified or the following error: Error: Can't load script data: RemoteData.UserData!
throw new Error(Q.format("Can't load script data: {0}!", name));
What am I doing wrong?
Thanx in advance.
There is no HasRole functionality. Use permissions.
Check service side error code in network tab.
Hello @volkanceylan. Thank you for the answers. The error about the remotedata is Authorization denied. I don't get this because the user has this explicit permission. When I remove the line the user can access the rows. Very strange.
Can you tell me what the function HasRole in permissionservice.cs is used for?
Thanks in advance.
@mrsjakie
if you want to use hasRole in typescript, try :
I did it in my project. hope this give a clue to solve your problem.
Thank you @adhikamafran, I appreciate your mail with a solution.
@adhikamafran, can you please send me the mail with solution file for this issue #1327 ? My emailId is [email protected]. Thanks in advance.
@adhikamafran can u plz email me solution too
thx
Most helpful comment
@mrsjakie
if you want to use hasRole in typescript, try :
I did it in my project. hope this give a clue to solve your problem.