Programmatically login with a hard coded admin account with all privileges (RTC Java Api / server-side)
Hi Forum!
I will give the whole context:
We are developing a follow-up action called "E-mail notification" that sends an email when a work item changes it's state on a project area called (for example) "Project 1".
These notifications are based on "E-mail rules" which are work items from another project area called "Project 2". These e-mail rules provides information about WHEN an email should be sent, to WHOM it should be sent and WHAT content it should have.
And now here is the issue:
Our plugin needs to programatically run a query on "Project 2" where a regular user has not access to or this user should not see. This plugin works when we are logged in with an admin account that has all permissions and privileges, obviously. But is not working when a regular user is logged in and tries to save a work item due to, I think, lack of permissions and privileges.
So my questions are:
On server-side, is it possible to hard code an admin account that logins instead of the regular user, then perform all the code as an admin, and finally logs out? How?
If this is possible, is it safe?
Any help would be appreciated.
Thank you!