RobotStudio event

UAS code

Options

Hi.

I've made a FlexPendant 5.09 application but I need to use UAS to protect the the settings in the application from all that hasn't logged in as for example programmer in the UAS.

Does anyone have the code or good information how to do this??

M Johnson

 

Comments

  • RussD
    Options
    There is not much more to it than what is described in the user's guide. You can check what grants the user has when your app launches and use this information to disable/enable access to functionality. You must determine exactly what grants are required at a minimum to run your app (this will depend on the functionality of your app and will require some experimentation) and make sure that the user has at least these rights, otherwise you should block any access by disabling forms/tabs/etc. Beyond that, if they have at least the minimum requirements, you can choose to selectively disable/enable functionality based upon what additional grants they have.
    Russell Drown
  • Hi Russell.

    I didn't really understand how to check what grants the user has when the application launches and how to disable/enable access to functionality after reading the user's guide.

    Can you give a codeexample how to do this?

    Best regards  M Johnson

  • RussD
    Options

    Here is a sample

    2007-11-15_205610_uas.zip

    The disabling of functionality can be done by setting the enabled property of an object like a button or tab or group box to disabled when the user doesn't have the correct grants. There are many ways to do this and it really depends on what your app does and how it is designed.

    Typically one would identify the grants that the user possesses when their app starts and remeber that information as long as the app is alive. You can then use it as needed when the user navigates through your app to decide whether to enable or disable some or all of your UI objects.

    I assume that you are familiar with how UAS works in general and how you assign grants to roles and assign users to roles.

    RussD2007-11-15 22:21:48
    Russell Drown