mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #11137 from OlegZharkov/fix_user_dir_import
[20.09] Fix permission in user dir library import
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
from History</a
|
||||
>
|
||||
<a
|
||||
v-if="user_library_import_dir"
|
||||
v-if="user_library_import_dir_available"
|
||||
class="dropdown-item cursor-pointer"
|
||||
@click="addDatasets('userdir')"
|
||||
>
|
||||
@@ -209,7 +209,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
is_admin: false,
|
||||
user_library_import_dir: false,
|
||||
user_library_import_dir_available: false,
|
||||
library_import_dir: false,
|
||||
allow_library_path_paste: false,
|
||||
list_genomes: [],
|
||||
@@ -230,7 +230,7 @@ export default {
|
||||
created() {
|
||||
const Galaxy = getGalaxyInstance();
|
||||
this.is_admin = Galaxy.user.attributes.is_admin;
|
||||
this.user_library_import_dir = Galaxy.config.user_library_import_dir;
|
||||
this.user_library_import_dir_available = Galaxy.config.user_library_import_dir_available;
|
||||
this.library_import_dir = Galaxy.config.library_import_dir;
|
||||
this.allow_library_path_paste = Galaxy.config.allow_library_path_paste;
|
||||
|
||||
|
||||
@@ -411,6 +411,7 @@ var AddDatasets = Backbone.View.extend({
|
||||
if (typeof response.responseJSON !== "undefined") {
|
||||
if (response.responseJSON.err_code === 404001) {
|
||||
Toast.warning(response.responseJSON.err_msg);
|
||||
getGalaxyInstance().modal.hide();
|
||||
} else {
|
||||
Toast.error(response.responseJSON.err_msg);
|
||||
}
|
||||
|
||||
@@ -109,6 +109,7 @@ class ConfigSerializer(base.ModelSerializer):
|
||||
'select_type_workflow_threshold' : _use_config,
|
||||
'file_sources_configured' : lambda config, key, **context: self.app.file_sources.custom_sources_configured,
|
||||
'upload_from_form_button' : _use_config,
|
||||
'user_library_import_dir_available' : lambda config, key, **context: bool(config.get('user_library_import_dir')),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user