Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
Moegal  
#1 Posted : Thursday, June 27, 2019 3:32:42 AM(UTC)
Moegal

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
Sergey_f  
#2 Posted : Thursday, June 27, 2019 8:54:03 PM(UTC)
Sergey_f

Rank: Newbie

Groups: Member, Moderator
Joined: 12/7/2018(UTC)
Posts: 3

Hello Marty,

Please, clarify, what system do you use?

Regards,
Sergey
Moegal  
#3 Posted : Saturday, June 29, 2019 2:53:32 AM(UTC)
Moegal

Rank: Member

Groups: Member
Joined: 3/5/2004(UTC)
Posts: 13

asp.net winforms

Sergey_f  
#4 Posted : Monday, July 1, 2019 12:19:46 AM(UTC)
Sergey_f

Rank: Newbie

Groups: Member, Moderator
Joined: 12/7/2018(UTC)
Posts: 3

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.htm
https://customerscanvas....gerconfig.itabconfig.htm
https://customerscanvas..../using-image-gallery.htm
https://customerscanvas....rydialogconfigparsed.htm
https://customerscanvas....ocs/cc/client-config.htm

Let me know if it helps.

Regards,
Sergey
Users browsing this topic
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.