kavin
I'm new here

How to assign the server admin via First Spirt access api?

Hi All,

I have to provide the server admin roles via First Spirt access api.

I tried with the setAdminMode(true), but unfortunately it is not assigning the server admin permission to the user.


user.setAdminMode(true);

Could you please help us on this?

Version : 5.1.507

Thank you!

0 Kudos
11 Replies
Peter_Jodeleit
Crownpeak employee

It's not possible to provide the server admin role to a user via FirstSpirit access API. The API allows to query if the role is granted to the user ("isServerAdmin").

Calling the method "setAdminMode(true)" enables the admin mode, but only if the the server admin role is granted.

So the first is a persistent state which could be queried but not changed from API and the latter is a temporary and changeable state.

Peter
0 Kudos

Even though its not covered by the ACCESS / DEV API, I suppose you could use the de.espirit.firstspirit.manager.UserManager to do so. See UserManager#setServerAdmin(long, boolean).

0 Kudos