Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added redirect functionality for non authorized users #183

Merged
merged 3 commits into from
Jun 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions connectors/php/filemanager.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
// Implement this function to authenticate the user, for example to check a
// password login, or restrict client IP address.
//
// If this function returns a string, the authenication will fail and
// the user will be redirected to the returned URL.
//
// This function only authorizes the user to connect and/or load the initial page.
// Authorization for individual files or dirs is provided by the two functions below.
//
Expand Down
12 changes: 6 additions & 6 deletions languages/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"ERROR_CONFIG_FILE": "Error in the configuration file: %s",
"ERROR_COPYING_DIRECTORY": "Errore durante la copia della directory da %s a %s.",
"ERROR_COPYING_FILE": "Errore durante la copia del file da %s a %s.",
"ERROR_CREATING_ZIP": "Errore nel creare l'archivio ZIP.",
"ERROR_EXTRACTING_FILE": "Error extracting items from archive",
"ERROR_CREATING_ZIP": "Errore nella creazione dell'archivio ZIP.",
"ERROR_EXTRACTING_FILE": "Errore nell'estrazione degli elementi dall'archivio.",
"ERROR_OPENING_FILE": "Errore nell'apertura del file.",
"ERROR_MOVING_DIRECTORY": "Errore durante lo spostamento della directory da %s a %s.",
"ERROR_MOVING_FILE": "Errore durante lo spostamento del file da %s a %s.",
Expand Down Expand Up @@ -121,11 +121,11 @@
"unit_gb": "gb",
"unit_kb": "kb",
"unit_mb": "mb",
"upload_action_abort": "Abort",
"upload_action_delete": "Delete",
"upload_action_abort": "Annulla",
"upload_action_delete": "Cancella",
"upload_action_info": "Info",
"upload_action_resume": "Resume",
"upload_action_start": "Start",
"upload_action_resume": "Riprendi",
"upload_action_start": "Inizia",
"upload_aborted": "Il caricamento è stato interrotto. Il file non è stato scaricato o parzialmente scaricatod.",
"upload_choose_file": "Selezionare un file da caricare.",
"upload_dropzone_message": "Drop dei file da caricare qui",
Expand Down
8 changes: 5 additions & 3 deletions scripts/filemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@ $.richFilemanagerPlugin = function(element, pluginOptions)
.then(function() {
return configure();
})
.then(function(conf_d, conf_u) {
return performInitialRequest();
})
.then(function() {
return localize();
})
.then(function(conf_d, conf_u) {
return performInitialRequest();
})
.then(function() {
return includeTemplates();
})
Expand Down Expand Up @@ -2758,6 +2758,8 @@ $.richFilemanagerPlugin = function(element, pluginOptions)
}
$.each(response.errors, function(i, errorObject) {
fm.error(formatServerError(errorObject));
if (errorObject.arguments.redirect)
window.location.href = errorObject.arguments.redirect;
});
}
};
Expand Down
4 changes: 2 additions & 2 deletions scripts/filemanager.min.js

Large diffs are not rendered by default.