Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

User access to create assets but not the folder

vsharm
Level 4
Level 4

We have a requirement where the requirement is like - under the location /content/dam/site, user should not be able to create the folders, however they user should be able to create assets.

Under the /useradmin console if we uncheck the create checkbox for /content/dam/site then they will not be able to create anything (folder as well as assets).

any idea how this can be achieved through some configuration settings or by any other way?

Thanks,

1 Accepted Solution
Jörg_Hoh
Correct answer by
Employee
Employee

Technically an asset node (dam:Asset) can have child nodes; it just might not be available in the UI. On the other hand you cannot deny the creation of nodes of a certain nodetype. If you want users to adhere to a certain folder structure you created, you need to find another way.

If your users use the Sling Post Servlet to upload assets, you can use a CommitHook to the PostServlet to validate the change before it is actually persisted. There you can enforce such a rule.

Jörg

View solution in original post

6 Replies
Jörg_Hoh
Correct answer by
Employee
Employee

Technically an asset node (dam:Asset) can have child nodes; it just might not be available in the UI. On the other hand you cannot deny the creation of nodes of a certain nodetype. If you want users to adhere to a certain folder structure you created, you need to find another way.

If your users use the Sling Post Servlet to upload assets, you can use a CommitHook to the PostServlet to validate the change before it is actually persisted. There you can enforce such a rule.

Jörg

View solution in original post

vsharm
Level 4
Level 4

Thank you for the input Jörg. It seems like it is not something which can be easily done. Our users are not using Sling Post Servlet, otherwise we could have added some check at that time. We do not want to even show the user the option for create folder.

Jörg_Hoh
Employee
Employee

In that case a customization of the UI and to hide the "create folder" item might be sufficient.

vsharm
Level 4
Level 4

We had thought about it, but folder will in-visible to only certain user groups with an ability to not be able to drag and drop. so it is more than hiding the button.

Jörg_Hoh
Employee
Employee

Can you make it work with RenderConditions in Touch UI? They should give you the flexibility to display or hide this functionality as you wish.