Logout Menu Item


(Jonathan Pautsch) #6

The spacing seems a little off (less padding) compared to the other links, what classes is it using?


Feedback on new :hamburger: and user menus
(cpradio) #7

Yeah, I know, but once you add that padding it forces a scrollbar, so choose your poison.

You can add the padding using (if my memory serves me right)

.logout-menu-item a { padding: 0.25em 0.5em; }

(cpradio) #8

I guess, I could put padding: 0 0.5em; so it at least aligns horizontally…


Feedback on new :hamburger: and user menus
(Robin Ward) #9

Awesome, I’m definitely going to be installing this locally as I log out while developing all the time.


(Cyrus Stoller) #10

This great. Thanks for sharing.

Out of curiosity, why is the logout button being removed?


(Wes Osborn) #11

See the full history over here:

In my searching, this will make Discourse somewhat unique as every other web property I looked at had a Log out option available from every page. Thanks @cpradio for this plugin as I think it would be something we would get questions about from our users.


(cpradio) #12

Please do give me any feedback regarding styling (as I went really simple at this point). So if you prefer horizontal alignment, that is an easy change I can make. The vertical padding is a bit more complicated due to scrolling.


(Neil Lalonde) #13

I prefer it even simpler, without the glyph. But it’s better to have it and hide it with custom CSS. Thanks for the plugin!


(Daniel M ) #14

If only this plugin was a default one *sigh*
I still think that more people want the logout built in, even if it was a checkbox on the admin panel.


(Michael Downey) #15

Thank you @cpradio!

Is this ready for production use at this point? We consider it a serious security risk to have taken away the Log Out link, because a large portion of our users are on shared systems.


(cpradio) #16

Yes, if you don’t mind the minor styling possible issues (horizontal alignment slightly off) – scroll up to see a possible solution for that.

I’ve confirmed this to work on a couple of systems I have for dev purposes.


(Michael Downey) #17

Fantastic. We just installed it and Log Out is back!

However … at least on Firefox latest on Fedora, if I click “Log Out” nothing visibly happens in the UI. I would think I’m still logged in but if I reload the browser, I am actually logged out.


(cpradio) #18

Does that happen when you use the Profile Logout button too?


(Michael Downey) #19

Nope; when using that we’re redirected to / and signed out with the global announcement banner message, etc.


(cpradio) #20

K, I’ll see what I can figure out.


(Michael Downey) #21

Also reproduced on Chrome 44.0.2403.157 OSX 10.10.5.

We are using SSO … not sure if that might make a difference?


How to change a site setting via the Console
(cpradio) #22

Not sure, as to me, it looks like the Profile Page button calls User.logout(), which is exactly what I’m calling… The only noticeable difference is the markup that is output, I have
<a href data-ember....> and the profile page has <a data-ember....>, so whether that extra href is causing the ruckus is unknown to me.


(cpradio) #23

@downey,

I haven’t been able to reproduce the issue yet (but I’m at work, so I’m on a Windows machine right now).

I have created a branch of what I think the problem is, the extra href attribute, but I have no way of confirming it.

If you wish to try it out, I can say, it still works just fine on Windows, using Chrome, IE, and Firefox.

You’d simply have to have it use the no-redirect-fix branch instead of master.

When I get home tonight, I’ll try to reproduce it there on a few Linux machines that I have.


(Robin Ward) #24

BTW not sure if you saw but I sent in a PR to make this slightly more idiomatic Discourse :smile:


(Cyrus Stoller) #25

@wesochuck Thanks for sharing.

I’m not a fan of removing the logout link by default. I guess I’ll be using this plugin.