Skip to Content

How to check roles/permissions with HTML5(HCP)?

Hello :)

I want to build a HTML5 app for my HCP wich is aware of roles/permissions of an user.

With security constraints and permissions one is able to create restricted areas of the application. If one does not have the right permission, one is not able to access the specific area.

But how is it possible to check which permissions an user has?


An app where one has to login to see details of whatever. If one has the role of an editor, one should see a button "edit". If one does not have this role (or permission), the button should not be visible.

How am i able to check this kind of user attributes? (because they are not included in the attributes /service/userapi/attributes or /currentuser)

thanks in advance :)


I don´t mean how to assign roles to permissions, but how to check which permissions the specific user has while using the app.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Apr 03, 2018 at 07:37 PM


    Did you get an elegant solution to this (along the lines of using user api services)??

    There is mention of a URL parameter multiValuesAsArrays. i tried using:


    but i cant get this to return an array of user_groups

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 05, 2018 at 12:41 PM

    I got is working... replaced the ?$ with just ?

    Add comment
    10|10000 characters needed characters exceeded

  • May 21 at 12:14 PM

    Please Tell me how you had done it ,

    i am also stucked in this Problem..

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 14, 2017 at 10:55 AM


    roles for a user can be checked in the SAP CLOUD PLATFORM Cockpit (see 4. ):

    Alternatively, you can do it using the Authorizations section for the account.

    1. In the cockpit, go to the Start of the navigation path Security Next navigation step Authorizations End of the navigation path section for the account.
    2. Enter the Users or Groups tab respectively.
    3. In the User or Group field respectively, enter the name of the required user or group. If you want to create a new user or group, simply assign the required roles from here.
    4. Choose Show Assignments. The table below shows all roles that are already assigned to this user or group.

    Permissions for an HTML5 application are defined in the application descriptor file. This is done by the developer so far as I know.

    Add comment
    10|10000 characters needed characters exceeded

    • Thanks for your answer, but this is not what i meant.

      I have created roles and groups in the cockpit and also permissions in the applications descriptor file. They are also "connected".

      But I want to know, which of these roles/permissions the specific logged-in user has while using the app. Some variables to check or something. An array of permissions, a path, json or whatever.