Add Security to Objects created without WorkWithPlus

You can also add security to objects that were created without applying WorkWithPlus pattern, and its actions inside it.In order to do this, you have to insert an item in DataProvider SecGetAdvancedSecurityUserFunctionalities.

SecGetAdvancedSecurityUserFunctionalities is a DataProvider where user can include in WorkWithPlus Security some functionalities that are not associated to an object created by the pattern. By default this DataProvider will be empty, but if user has a WebPanel created without WorkWithPlus (MyWebPanel), and wants to set security user could set the following to this DataProvider:

addsecuritytoobjectscreatedwithoutwwpImg01

You can assign a new functionality to these webPanel, or assign a functionality that already exists in the application security, in order to group it into an existent functionality.

If the webPanel 'MyWebPanel' has a MasterPage that contains WWP Security (this is set in Master Pages with Security node of WWPConfiguration), then the security will be ready for this webPanel after following steps defined in Update Advanced Security Funcionalities   

In the other hand, if the webPanel 'MyWebPanel' has a MasterPage that does not contain Security, you will need to add the following code in your webPanel:

addsecuritytoobjectscreatedwithoutwwpImg02

In order to add security to an action or link of this object, you have to follow the steps below:

  1. Insert the functionality associated to the action in DataProvider SecGetAdvancedSecurityUserFunctionalities the same way we did it for the webPanel:

    addsecuritytoobjectscreatedwithoutwwpImg03
     

  2. Add the following code in Refresh Event of 'MyWebPanel' object, in order to check for security in that action or link:
    addsecuritytoobjectscreatedwithoutwwpImg04
    The webPanel looks like this, that is why we set visible = false to the action:
    addsecuritytoobjectscreatedwithoutwwpImg05

  3. The security will be ready for this webPanel and its actions after following steps defined in Update Advanced Security Funcionalities