Role - Custom Actions

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.

Role - Custom Actions

Postby dire » Wed Nov 29, 2017 3:05 pm

Hello,

I need advice how to solve a problem on restrict access to custom actions.
I made some custom actions (send by email, send by sms) on table. Now I would like to restrict these two options based on user role.

Example: User “John Smith” has role “Power User” and has privilege for using both custom actions.
dire
 
Posts: 34
Joined: Mon Sep 26, 2016 7:53 pm

Re: Role - Custom Actions

Postby Webmaster » Thu Nov 30, 2017 11:23 am

Just add the checking when creating the Custom Actions. For example:

if (CurrentUserName() == "...") // Change your condition here
CustomActions["star"] = new cListAction("star", "Add Star");
Webmaster
 
Posts: 10733
Joined: Fri Aug 06, 2004 5:59 pm


Return to General Discussion (ASP.NET Maker)