Foros de discusión
add application
Gunnar Storäng, modificado hace 14 años.
add application
New Member Mensajes: 14 Fecha de incorporación: 1/10/09 Mensajes recientes
Is it possible to set up a users permission so that he only can add application and NOT manage pages?
We have a customer that need to set up different permissions for different users, nothing strange about that but here is a specification from our customer:
"The user should be able to add a portlet, delete a portlet, change a portlets title, upload images but not delete images, should not be able to change portlets configurations."
Is it possible to create a role that match these criteria?
Liferay Portal Standard Edition 5.1.5 (Arena / Build 5105 / May 31, 2009)
We have a customer that need to set up different permissions for different users, nothing strange about that but here is a specification from our customer:
"The user should be able to add a portlet, delete a portlet, change a portlets title, upload images but not delete images, should not be able to change portlets configurations."
Is it possible to create a role that match these criteria?
Liferay Portal Standard Edition 5.1.5 (Arena / Build 5105 / May 31, 2009)
Lisa Simpson, modificado hace 14 años.
RE: add application
Liferay Legend Mensajes: 2034 Fecha de incorporación: 5/03/09 Mensajes recientes
Yes you can do that with a custom role.
Gunnar Storäng, modificado hace 14 años.
RE: add application
New Member Mensajes: 14 Fecha de incorporación: 1/10/09 Mensajes recientes
Can you please tell me how to config the permissions for a user that get him permissions to add application but not manage pages?
Tarun S. Kayasth, modificado hace 14 años.
RE: add application
Regular Member Mensajes: 162 Fecha de incorporación: 8/06/07 Mensajes recientes
Hi Gunnar,
As per the comment you added:
"The user should be able to add a portlet, delete a portlet, change a portlets title, upload images but not delete images, should not be able to change portlets configurations."
It seems to be the Document library portlet configuration.
i can not get its relation with Adding application and manage pages as it is talking about " not deleting image and not be able to change Portlet config".
Thanks,
Tarun Kayasth
CIGNEX Technologies Pvt. Ltd.
As per the comment you added:
"The user should be able to add a portlet, delete a portlet, change a portlets title, upload images but not delete images, should not be able to change portlets configurations."
It seems to be the Document library portlet configuration.
i can not get its relation with Adding application and manage pages as it is talking about " not deleting image and not be able to change Portlet config".
Thanks,
Tarun Kayasth
CIGNEX Technologies Pvt. Ltd.
Dhrutika parekh, modificado hace 14 años.
RE: add application
Expert Mensajes: 435 Fecha de incorporación: 9/02/09 Mensajes recientes
Hi,
To remove show add application to user: you can use this code
#if( !(themeDisplay.getPermissionChecker().isCompanyAdmin())
#if ($show_add_content)
<li class="add-content">
<a href="javascript: void(0);" onclick="$add_content_url">$add_content_text</a>
</li>
#end
#end
And to remove manage pages for users:
#if ($show_page_settings)
<li class="page-settings">
<a href="$page_settings_url">$page_settings_text</a>
</li>
#end
Thanks,
Dhrutika Parekh
Cignex Technologies Pvt Ltd.
To remove show add application to user: you can use this code
#if( !(themeDisplay.getPermissionChecker().isCompanyAdmin())
#if ($show_add_content)
<li class="add-content">
<a href="javascript: void(0);" onclick="$add_content_url">$add_content_text</a>
</li>
#end
#end
And to remove manage pages for users:
#if ($show_page_settings)
<li class="page-settings">
<a href="$page_settings_url">$page_settings_text</a>
</li>
#end
Thanks,
Dhrutika Parekh
Cignex Technologies Pvt Ltd.
Gunnar Storäng, modificado hace 14 años.
RE: add application
New Member Mensajes: 14 Fecha de incorporación: 1/10/09 Mensajes recientes
Hi and thanks for answer,
I´m not so familiar with velocity scripts but I assume this script means that if I am a companyadmin I can see add application in the menu. And companyadmin is the role for the administrator? Or is it the username?
I tried to cut and paste the script to init_custom.vm, restarted the tomcat service and get nothing, Liferay produced an empty page.
The url looks ok but i can´t see anything. Remarked your lines in the script and everything is visible again.
Can you explain how to get this lines to work for a specific user?
Thanks again!
I´m not so familiar with velocity scripts but I assume this script means that if I am a companyadmin I can see add application in the menu. And companyadmin is the role for the administrator? Or is it the username?
I tried to cut and paste the script to init_custom.vm, restarted the tomcat service and get nothing, Liferay produced an empty page.
The url looks ok but i can´t see anything. Remarked your lines in the script and everything is visible again.
Can you explain how to get this lines to work for a specific user?
Thanks again!
Dhrutika parekh, modificado hace 14 años.
RE: add application
Expert Mensajes: 435 Fecha de incorporación: 9/02/09 Mensajes recientes
HI ,
This code is alreday there in dock.vm file of theme .you don't have to put it in init_custom.vm
You need to add this condtion in dock.vm.
And that companyAdmin() is default method provided by liferay in PermissionChecker.java file.
Try it out. Hope it helps!!!
Thanks,
Dhrutika Parekh
Cignex Technologies Pvt Ltd
This code is alreday there in dock.vm file of theme .you don't have to put it in init_custom.vm
You need to add this condtion in dock.vm.
And that companyAdmin() is default method provided by liferay in PermissionChecker.java file.
Try it out. Hope it helps!!!
Thanks,
Dhrutika Parekh
Cignex Technologies Pvt Ltd
Tarun S. Kayasth, modificado hace 14 años.
RE: add application
Regular Member Mensajes: 162 Fecha de incorporación: 8/06/07 Mensajes recientes
Hi Gunnar,
You can create a Custom Role by giving specific permissions to the portlet:
Steps:
- Create a new role say name CustomerRole
- Type: Regular
- For CustomerRole, go to Action > Define Roles
- Add portlet permission > select Document Library
"Roles » customroles » Document Library "
- define role as per your desire.
- [screenshot attached]
- save the updates
- create a user and assign this "CustomerRole" and check after signing in as that new user.
Note: if user adds any image or creates any folder he will have permission to delete it. but he can not delete the folders and documents created by other user
Thanks,
Tarun Kayasth
CIGNEX Technologies Pvt. Ltd.
You can create a Custom Role by giving specific permissions to the portlet:
Steps:
- Create a new role say name CustomerRole
- Type: Regular
- For CustomerRole, go to Action > Define Roles
- Add portlet permission > select Document Library
"Roles » customroles » Document Library "
- define role as per your desire.
- [screenshot attached]
- save the updates
- create a user and assign this "CustomerRole" and check after signing in as that new user.
Note: if user adds any image or creates any folder he will have permission to delete it. but he can not delete the folders and documents created by other user
Thanks,
Tarun Kayasth
CIGNEX Technologies Pvt. Ltd.
Archivos adjuntos: