mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 07:27:04 +00:00
6.3 perm error (#2294)
* Add login url to context * [backbone] turn to login page when 403
This commit is contained in:
@@ -454,10 +454,13 @@ define([
|
||||
prepareCollectionFetchErrorMsg: function(collection, response, opts) {
|
||||
var err_msg;
|
||||
if (response.responseText) {
|
||||
if (response['status'] == 401 || response['status'] == 403) {
|
||||
if (response['status'] == 401) {
|
||||
err_msg = gettext("Permission error");
|
||||
} else if (response['status'] == 403) {
|
||||
err_msg = gettext("Permission error");
|
||||
location.href = app.config.loginUrl + '?next='
|
||||
+ encodeURIComponent(location.pathname + location.hash);
|
||||
} else {
|
||||
//err_msg = gettext("Error");
|
||||
err_msg = this.HTMLescape(JSON.parse(response.responseText).error_msg);
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user