Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is there UserService analogy in js?

Igor Slinko
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 24, 2013

Or should I use REST to check if pageState.getCurrentUser() user is admin?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Igor Slinko
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 24, 2013

pageState.getCurrentUser().attributes.isAdmin

2 votes
Adam
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 24, 2013

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.

TAGS
AUG Leaders

Atlassian Community Events