CA Service Management

 View Only

check_func_access.txt 

Aug 07, 2015 11:35 AM

Since all trigger triggered spels are run under superuser account, data partition and functional access constraints will not work. In this document I provide the spel script to check what kind of functional access for the object has role of the logged in user.

To call provided function use following statement:

api::manual_security("cr")

Statistics
0 Favorited
15 Views
1 Files
0 Shares
4 Downloads
Attachment(s)
zip file
check_func_access.txt.zip   765 B   1 version
Uploaded - May 29, 2019

Tags and Keywords

Comments

Feb 22, 2018 04:07 PM

Feb 22, 2018 07:11 AM

Perfect Timur, you're a genius!
BUT ... It does not work properly. Some data partitions are not displayed in the user context.
There must be some more secret we do not know yet.

Feb 21, 2018 02:21 PM

found it!

void get_constraints_do() {
     send_wait(0, top_object(), "call_attr",
          "iss",     // any factory, doesnt matte
          "get_constraints",
          "iss",     // constraint factory
          "ALL"     // constraint type
                    // you can use short versions like VIE PRE UPD CRE DEL DEF
                    // or regular View Update Pre_Update etc
     );
}

Result based on role that executes this method, ex:

// Will show result for Admin role because TestAdmin using it
bop_cmd -u TestAdmin -f gc.frg get_constraint_do()
// Will show result for Emloyee role because TestEmployee using it
bop_cmd -u TestEmployee -f gc.frg get_constraint_do()

Regards,

Timur Alimov

Feb 21, 2018 10:19 AM

Hi guys giedrius, cdtj,

 

I need to use some spel function that checks whether the user data partition allows the execution of a particular update operation on an object.
I have discovered that there is a function called 'get_constraints' that could help in this but I have not figured out how to use it.

 

"get_constraints", [(string)], [(string)]

 

I imagine it to be as follows:
send_wait (0, top_object (), "call_attr", "iss_wf", "get_constraints", [(string)], [(string)]);

 

or...
send_wait (0, top_object (), "call_attr", "cnt", "get_constraints", "iss_wf", "Create");

 

Any idea?

Related Entries and Links

No Related Resource entered.