Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,300,030
Community Members
 
Community Events
165
Community Groups

How to logout in my plugin

Hi.

I am trying to force logout when I log in in my plugin. What should I do?

Jira has a LoginManager, is there anything similar to bitbucket?

1 answer

0 votes

I think I do not understand the requirement here.

This sentence:

"I am trying to force logout when I log in in my plugin"

reads to me like you want to log the user out when someone starts trying to use your plugin.  This sounds broken to me, because once logged out, they would not be able to use your plugin, as they've logged out of the system the plugin was doing things in.

Could you explain this more to us please?

I mean, I want to log out the logged in user if it is not an admin user.

That would be a bad thing to do to a person trying to use your system, and I cannot work out how that would be useful to anyone.  If someone is not an admin and they land on an admin link, why would you not just tell them "you are not an admin, so yo can't do this" and leave them logged in to continue what they were doing, rather than log them out and stuff up their experience?

I want to log out when accessing an unauthorized page.

That is a horrid thing to do to your people.  Why  not just give them a "you do not have access to this page, but we're not going to throw you out for clicking on something" message?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,255 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you