I'm trying to implement JSD Server in my organization. I want to add an admin user, and use it only when changes must be made. For security purposes, I wonder if I can set up the system so it sends me an email notification when the admin user logs in. Is this possible, or is there a better way to do it?
You can probably do this with Scriptrunner. I'm thinking setting it up as a job that runs every X minutes.
This code should show you the usernames and last login time of all users with a current Jira session.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.web.session.currentusers.JiraUserSessionTracker
import org.apache.log4j.Logger;
import org.apache.log4j.Level;
log.setLevel(Level.DEBUG);
def sessionTracker = JiraUserSessionTracker.getInstance();
def sessionSnapshot = sessionTracker.getSnapshot()
sessionSnapshot.each() { userSession ->
log.info("Username: ${userSession.getUserName()} - Last Access Time: ${userSession.getLastAccessTime()}")
}
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.