Or should I use REST to check if pageState.getCurrentUser() user is admin?
Community moderators have prevented the ability to post new answers.
pageState.getCurrentUser().attributes.isAdmin
There's no JS equivalent for UserService. Usually you hide the admin features from non-admins when you load the initial page, and REST endpoints will return error codes when you try to use them as a non-admin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.