Foren

How to i restrict user from creating his own private and public page?

vikas suresh thakre, geändert vor 14 Jahren.

How to i restrict user from creating his own private and public page?

Junior Member Beiträge: 97 Beitrittsdatum: 18.05.09 Neueste Beiträge
Hello all,
How to i restrict user from creating his own private and public page? I don't want this feature. also i don't want to show the private pages to the users.
I want to disable this functionality.
is there any setting ither in property file or some where else...
any help here is appreciable!!!
thanks in advance!!
thumbnail
zahid khan, geändert vor 14 Jahren.

RE: How to i restrict user from creating his own private and public page?

Regular Member Beiträge: 116 Beitrittsdatum: 30.07.08 Neueste Beiträge
Hi vikas ,

u can do that by not allowing the user to have the manage pages option, and to that u have do some chnages in dock.vm have a condition there for mangae pages so that it is visible only for the admin ,we have a condition $isOmniAdmin use that that and the user will not see the manage pages option.

HTH

Zahid khan
thumbnail
Martin Goldhahn, geändert vor 14 Jahren.

RE: How to i restrict user from creating his own private and public page?

Junior Member Beiträge: 34 Beitrittsdatum: 23.11.07 Neueste Beiträge
There is an error in Liferay related to omniAdmin (http://issues.liferay.com/browse/LPS-4856). I would think a better condition would be $permissionChecker.isCompanyAdmin($company_id)
vikas suresh thakre, geändert vor 14 Jahren.

RE: How to i restrict user from creating his own private and public page?

Junior Member Beiträge: 97 Beitrittsdatum: 18.05.09 Neueste Beiträge
thanks guys for replying!!!!!
really appreciable!!!!
liferay forum rocks :-)

but the pages can also be added from the myaccount option.
when user clicks on the my account, he can see three option profile, public page, and private page, by clicking on public and private page, he can able to add pages in the home page. I want to rescrict that also.
how do i do that...
thumbnail
zaheer mohammed saddapalli, geändert vor 14 Jahren.

RE: How to i restrict user from creating his own private and public page?

Regular Member Beiträge: 165 Beitrittsdatum: 15.01.08 Neueste Beiträge
Hi Vikas,

To hide My Pages option form control panel.

Find liferay-portlet.xml from portlal source can replace from


<portlet>
		<portlet-name>140</portlet-name>
		<icon>/html/icons/default.png</icon>
		<struts-path>my_pages</struts-path>
		<portlet-url-class>com.liferay.portal.struts.StrutsActionPortletURL</portlet-url-class>
		<control-panel-entry-category>my</control-panel-entry-category>
		<control-panel-entry-weight>2.0</control-panel-entry-weight>
		<control-panel-entry-class>com.liferay.portlet.mypages.MyPagesControlPanelEntry</control-panel-entry-class>
		<use-default-template>false</use-default-template>
		<restore-current-view>false</restore-current-view>
		<private-request-attributes>false</private-request-attributes>
		<private-session-attributes>false</private-session-attributes>
		<render-weight>50</render-weight>
		<header-portlet-css>/html/portlet/communities/css.jsp</header-portlet-css>
		<header-portlet-css>/html/portlet/enterprise_admin/css.jsp</header-portlet-css>
		<css-class-wrapper>portlet-enterprise-admin</css-class-wrapper>
		<system>true</system>
	</portlet>




with



<portlet>
		<portlet-name>140</portlet-name>
		<icon>/html/icons/default.png</icon>
		<struts-path>my_pages</struts-path>
		<portlet-url-class>com.liferay.portal.struts.StrutsActionPortletURL</portlet-url-class>
		<!--<control-panel-entry-category>my</control-panel-entry-category>-->
		<!--<control-panel-entry-weight>2.0</control-panel-entry-weight>-->
		<!--<control-panel-entry-class>com.liferay.portlet.mypages.MyPagesControlPanelEntry</control-panel-entry-class>-->
		<use-default-template>false</use-default-template>
		<restore-current-view>false</restore-current-view>
		<private-request-attributes>false</private-request-attributes>
		<private-session-attributes>false</private-session-attributes>
		<render-weight>50</render-weight>
		<header-portlet-css>/html/portlet/communities/css.jsp</header-portlet-css>
		<header-portlet-css>/html/portlet/enterprise_admin/css.jsp</header-portlet-css>
		<css-class-wrapper>portlet-enterprise-admin</css-class-wrapper>
		<system>true</system>
	</portlet>



Hope this will help

With Regards,
Saddapalli Mohammed Zaheer
thumbnail
zahid khan, geändert vor 14 Jahren.

RE: How to i restrict user from creating his own private and public page?

Regular Member Beiträge: 116 Beitrittsdatum: 30.07.08 Neueste Beiträge
hi vikas u can use the same conditions in those jsp pages as well, go that particular page and have a condition there for having three tabs for admin and only one tab for normal user's

you can do it,it is straight forward codition checking in the jsp

HTH

Zahid khan
thumbnail
Jerry Niu, geändert vor 14 Jahren.

RE: How to i restrict user from creating his own private and public page?

Expert Beiträge: 451 Beitrittsdatum: 21.06.06 Neueste Beiträge
vikas suresh thakre:
How to i restrict user from creating his own private and public page? I don't want this feature. also i don't want to show the private pages to the users.
I want to disable this functionality.


By default, users with the Power User Role will get their own Webspace (community) that includes Public and Private pages. By default, Users will not. Users can still get this, but you need to activate it via properties.

So, I would suggest that you remove the "Power User" role from the default user associations.

In the properties file, modify this for your own purposes:

##
## Admin Portlet
##

    #
    # Input a list of default role names separated by \n characters.
    #
    admin.default.role.names=Power User\nUser


So, what about users that have already been created. That's a harder as you'll have to remove it via data. I would create a start up to do this so you can leverage the Lifeary API to do it.

If links are the only thing you're looking to do, you can modify the theme. But I would do it via data.
Axel Nagel, geändert vor 14 Jahren.

RE: How to i restrict user from creating his own private and public page?

New Member Beiträge: 20 Beitrittsdatum: 02.09.09 Neueste Beiträge
I would also refer to get rid of the default PowerUser role for new users. That's what I did for that purpose.
Additionally I deactivateed the pages in the portal-ext.properties.



layout.user.private.layouts.enabled=false  //activate Personal Community with *private* pages 
layout.user.public.layouts.enabled=false   //deactivate Personal Community with *public* pages 



That worked fine for me.
vikas suresh thakre, geändert vor 14 Jahren.

RE: How to i restrict user from creating his own private and public page?

Junior Member Beiträge: 97 Beitrittsdatum: 18.05.09 Neueste Beiträge
Axel Nagel:
I would also refer to get rid of the default PowerUser role for new users. That's what I did for that purpose.
Additionally I deactivateed the pages in the portal-ext.properties.



layout.user.private.layouts.enabled=false  //activate Personal Community with *private* pages 
layout.user.public.layouts.enabled=false   //deactivate Personal Community with *public* pages 






thanks people for helping!!!
jerry's idea is good but in that i have to put in extra effort of removing the power user role
from each user. again that's not a big deal. we can do that from backend directly updating the users_roles table
i must set this property for future. so that newly created user will not get power usar role by default.

Axel's solution is too good. By setting this properties only admin can able to see the public and private page.
that's really Fantastic!!!
LOrDxx ThEGreat, geändert vor 14 Jahren.

RE: How to i restrict user from creating his own private and public page?

New Member Beiträge: 2 Beitrittsdatum: 07.03.10 Neueste Beiträge
Hi There,

I just installed Liferay 6.0 .

I want to create user that automatically has a public page includes friends, activiy, wall etc (social page) and users can not modify its look and feel, add remove application.. Like the liferay official website. How can I do ?

I also want to restric the User acces to the control panel (only change their settings not add page etc)

any help ?
gofri _, geändert vor 13 Jahren.

RE: How to i restrict user from creating his own private and public page?

Junior Member Beiträge: 92 Beitrittsdatum: 02.03.07 Neueste Beiträge
An old post, but still...
I am researching this too, and currently I have this prototype:
-Site Template for users' pages
-Group with this template as default for users
-All new users added to this Group by default
-basic layout for users' page is created with vm and semi-static portlets for easy-maintenance purposes
some settings in portal-ext.properties like layout.user.public.layouts.modifiable=false

I am not very sure this is the best way - if someone has better ideas, don't be ashamed to share.
Nicholas Tenczar, geändert vor 13 Jahren.

RE: How to i restrict user from creating his own private and public page?

Junior Member Beiträge: 53 Beitrittsdatum: 15.07.10 Neueste Beiträge
You can modify the default.user.public.layout and default.user.private.layout settings in portal-ext.properties. Search the portal.properties file to see how these are used, generally it allows you to define the layout and which portlets are on the page. If you use these properties in conjunction with layout.user.public.layouts.modifiable=false that will allow you to define an unmodifiable layout for users.

You can define which group(s) new users get added to through the portal settings in the control panel.