掲示板

User permissions

8年前 に Frédéric Aubé によって更新されました。

User permissions

Junior Member 投稿: 37 参加年月日: 14/07/17 最新の投稿
Hi,

Users with only one role User can see the Add New button from the asset publisher.
I dont want this!
I know it's because they probably have the possibility to add basic web content, contract, marketing banner, online training and sales presentation.

I have the feeling of having tried to search everywhere I could... How can I determine where the problem is ?
Control Panel > Users > Roles > User > Site Administration > Content : Everything is unchecked excepted View

Am i missing something?

Thanks
thumbnail
8年前 に Pavel Savinov によって更新されました。

RE: User permissions

Junior Member 投稿: 54 参加年月日: 15/05/29 最新の投稿
Hey Frédéric,

That button is not under control of permissions, but you have 2 options in this situation:

1) Disable the button from portlet's configuration page -> Display settings -> Show Add Content Button
2) Create a hook for the Asset Publisher portlet's view.jsp and check any permissions you like

(1) will disable Add button for everyone, (2) is a little bit more complex if you've never had a deal with Liferay Hooks, but looks more elegant.
8年前 に Frédéric Aubé によって更新されました。

RE: User permissions

Junior Member 投稿: 37 参加年月日: 14/07/17 最新の投稿
Thanks for the reply, I already removed the button to give me the time to find a solution.
I didn't tought about a hook, it's seems to be a good idea. I don't know how to do but i'll find a way emoticon
I'm still wondering why the other type of content are not shown and the 5 mentionned before are. Are you sure that permission can't handle this?
thumbnail
8年前 に Pavel Savinov によって更新されました。

RE: User permissions

Junior Member 投稿: 54 参加年月日: 15/05/29 最新の投稿
Button will be shown anyway(as i said above, button is not under control of permissions), "drop-down" menu values depend on permissions, but not all of them (you can change this behaviour with a Hook also).

How to develop a hook:
Liferay Portal Development Guide - Hooks
thumbnail
8年前 に Olaf Kock によって更新されました。

RE: User permissions

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
Pavel Savinov:
...button is not under control of permissions...


While the button itself might not be controled through permissions, its appearance might be influenced by permissions if I'm not mistaken: If you don't have any permission to add any content (e.g. the drop down that opens after you click the button, offering content types like "Blog Entry, Web Content Article" etc.), the button won't be displayed (?)
thumbnail
8年前 に Pavel Savinov によって更新されました。

RE: User permissions

Junior Member 投稿: 54 参加年月日: 15/05/29 最新の投稿
Hi Olaf,

You are quite right!

Frédéric, sorry, i misled you. You can set appropriate permissions in Site Administration -> Content -> Documents and Media -> Manage -> Document Types, and then set permissions for all mentioned (Contract, Sales presentation, etc.) and the button will disappear.
There is no need to hook it.