mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FEATURE: logout redirect support
Allow users to also logout on an external site after logging out locally
This commit is contained in:
@ -81,7 +81,14 @@ window.Discourse = Ember.Application.createWithMixins(Discourse.Ajax, {
|
|||||||
Discourse.User.logout().then(function() {
|
Discourse.User.logout().then(function() {
|
||||||
// Reloading will refresh unbound properties
|
// Reloading will refresh unbound properties
|
||||||
Discourse.KeyValueStore.abandonLocal();
|
Discourse.KeyValueStore.abandonLocal();
|
||||||
window.location.pathname = Discourse.getURL('/');
|
|
||||||
|
var redirect = Discourse.SiteSettings.logout_redirect;
|
||||||
|
if(redirect.length === 0){
|
||||||
|
window.location.pathname = Discourse.getURL('/');
|
||||||
|
} else {
|
||||||
|
window.location.href = redirect;
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -923,6 +923,7 @@ en:
|
|||||||
delete_all_posts_max: "The maximum number of posts that can be deleted at once with the Delete All Posts button. If a user has more than this many posts, the posts cannot all be deleted at once and the user can't be deleted."
|
delete_all_posts_max: "The maximum number of posts that can be deleted at once with the Delete All Posts button. If a user has more than this many posts, the posts cannot all be deleted at once and the user can't be deleted."
|
||||||
username_change_period: "The number of days after registration that accounts can change their username (0 to disallow username change)."
|
username_change_period: "The number of days after registration that accounts can change their username (0 to disallow username change)."
|
||||||
email_editable: "Allow users to change their e-mail address after registration."
|
email_editable: "Allow users to change their e-mail address after registration."
|
||||||
|
logout_redirect: "Location to redirect browser to after logout EG: (http://somesite.com/logout)"
|
||||||
|
|
||||||
allow_uploaded_avatars: "Allow users to upload custom avatars."
|
allow_uploaded_avatars: "Allow users to upload custom avatars."
|
||||||
allow_animated_avatars: "Allow users to use animated gif avatars. WARNING: run the avatars:refresh rake task after changing this setting."
|
allow_animated_avatars: "Allow users to use animated gif avatars. WARNING: run the avatars:refresh rake task after changing this setting."
|
||||||
|
@ -255,6 +255,9 @@ users:
|
|||||||
username_change_period: 3
|
username_change_period: 3
|
||||||
auto_track_topics_after: 240000
|
auto_track_topics_after: 240000
|
||||||
email_editable: true
|
email_editable: true
|
||||||
|
logout_redirect:
|
||||||
|
client: true
|
||||||
|
default: ''
|
||||||
enable_names:
|
enable_names:
|
||||||
client: true
|
client: true
|
||||||
default: true
|
default: true
|
||||||
|
Reference in New Issue
Block a user