Rank: Member
Groups: Member
Joined: 3/5/2004(UTC) Posts: 13
|
How can we prevent users from uploading to the gallery if they are not logged in on our system?
Marty
|
|
|
|
Rank: Member
Groups: Member
Joined: 12/7/2018(UTC) Posts: 25
Was thanked: 1 time(s) in 1 post(s)
|
Hello Marty,
Please, clarify, what system do you use?
Regards, Sergey
|
|
|
|
Rank: Member
Groups: Member
Joined: 3/5/2004(UTC) Posts: 13
|
|
|
|
|
Rank: Member
Groups: Member
Joined: 12/7/2018(UTC) Posts: 25
Was thanked: 1 time(s) in 1 post(s)
|
Hi Marty, Depending on what widget you use for selecting images: image gallery or asset manager. You can use this logic: If the user is not logged in, do not show the "User" or "My files" tab in the widget. For the image gallery this code must be excluded from the configuration.: Code:{
"name": "User",
"type": "user",
"translationKey": "GalleryDialog.TAB_USER",
"showFileName": false,
"canEdit": true
"canUpload": true
"actionMode": {"psd": "merged"}
}
For example your image galley config code will be: Code:{
"widgets": {
"GalleryDialog": {
"defaultTabName": "Public",
"tabs": [
{
"name": "Public",
"type": "public",
"subFolderName": "Flyers",
"canEdit": true
},
{
"name": "Facebook",
"type": "facebook",
"canEdit": true,
"appKey": "123456789012345"
}
]
}
}
}
For the asset manager, this code must be excluded from the configuration: Code:{
"name": "My files",
"assetSourceInstance": "My files",
"iconClassName": "cc-icon-uploadable",
"controls": {"toolbarEnabled": false}
}
Your code will be look like: Code:{
"widgets": {
"AssetManager": {
"defaultTabName": "External urls",
"tabs": [
{
"name": "Public Gallery",
"assetSourceInstance": "Public Gallery",
"iconClassName": "cc-icon-add-image",
"controls": { "categoriesEnabled": false }
},
{
"name": "External urls",
"assetSourceInstance": "[source]External urls",
"iconClassName": "cc-icon-add-image",
"controls": {
"assetNameEnabled": false,
"insertToAllButtonEnabled": true
}
}
]
}
}
}
And vice versa, if the user logged in, include "User" or "My files" tab config code. These links can be useful: https://customerscanvas....ocs/cc/asset-manager.htmhttps://customerscanvas....gerconfig.itabconfig.htmhttps://customerscanvas..../using-image-gallery.htmhttps://customerscanvas....rydialogconfigparsed.htmhttps://customerscanvas....ocs/cc/client-config.htmLet me know if it helps. Regards, Sergey
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.