Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

User access to create assets but not the folder

Avatar

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

Avatar

Correct answer by
Employee Advisor

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

Avatar

Correct answer by
Employee Advisor

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

Avatar

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.

Avatar

Employee Advisor

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

Avatar

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.

Avatar

Employee Advisor

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.