Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Steve Bramley
189
Views
4
Comments
Grant User Role by dynamic name evaluation
Question
Forge
We're building a user security app. We're using the Roles and User tables so we can take advantage of the Check, Grant and Revoke functions. We would like to be able to dynamically determine which Check/Grant/Revoke function to at run-time without having to pre-define and ugly switch/lookup action. Is there any way to do this? perhaps with some kind of string evaluation like
Grant{AccountHolder}Role(UserId:)
where
AccountHolder
would be the 'name' value in the Roles table
J.
MVP
err,
It's a bit hard to read what your actual question is.
anyways, the answer is No for now.
George Jeffcock
do you mean at design time you don't code the function/method/action to invoke/call but invoke via dynamic call like in C# and Java you could use Reflection or C++ you can load DLL at runtime or execute from a command line etc. This technique I have used in dynamic menu systems and automated testing but most dislike for security reasons. Sorry I can't say if Outsystems supports dynamic calling of user actions, cant find any mention of it except for
https://www.roelvanlisdonk.nl/?p=3545
which i got from
https://www.outsystems.com/forums/discussion/10139/dynamically-calling-an-action/
Tim Timperman
Is it not easier to just manipulate the User_Role table directly? (create-update-delete)
This allows you to do exactly what you need.
1 reply
10 Jun 2016
Show thread
Hide thread
Steve Bramley
Tim Timperman
wrote:
Is it not easier to just manipulate the User_Role table directly? (create-update-delete)
This allows you to do exactly what you need.
Thanks Tim. Yeah I was thinking that shortly after I wrote this request. I'm new to OS and was leery of poking my greasy paws into system tables directly.
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...