Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Oscript function to enable/disable login access
Scott_Downing
Hi, There is requirement where we need to disable/enable login access for users with certain pre-defined conditions. Is there any available function which will help us do this with one call rather than figuring out the permission bitmask.Any hint/help is appreciated. Thanks
Find more posts tagged with
Comments
Donna Nalls
Hi Scott,It's difficult to answer this precisely without a little more information...from where do you want to make this one call to disable a user account??? From the user edit page?? Is this a one-time update or dynamically determined when each user logs in????Here are some thoughts:1) have a look at $LLIAPI.UsersPkg object...there are some methods in there for converting PrivsAssocToMask and vice versa. This is what is called along with the call to $LLIAPI.UsersPkg.UserUpdate when the user edit page is submitted.2) if all you want to do is disable the user and no other updates, you might just update the kuaf.userprivileges data directly with a sql query. if you want to determine the bitmask for the privileges, just go onto a user edit page, select the checkboxes you will use for disabling -- disable the user account, then go check the value of the userprivileges column for that user. That is the bitmask you can use for disabling accounts.... for example (in ll 9.2), i can deselect all privileges for a user -- then check the kuaf.userprivileges column and the value is 14. if i leave login enabled, but revoke public access, the value is 15.If neither of these is what you are looking for, plz provide a little bit more information and i'll try again!best,donna