Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
vikas suresh thakre
How to i restrict user from creating his own private and public page?
3. Oktober 2009 01:44
Antwort

vikas suresh thakre

Rang: Junior Member

Nachrichten: 97

Eintrittsdatum: 18. Mai 2009

Neue 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!!
zahid khan
RE: How to i restrict user from creating his own private and public page?
3. Oktober 2009 04:00
Antwort

zahid khan

Rang: Regular Member

Nachrichten: 116

Eintrittsdatum: 30. Juli 2008

Neue 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
Martin Goldhahn
RE: How to i restrict user from creating his own private and public page?
12. Oktober 2009 23:51
Antwort

Martin Goldhahn

Rang: Junior Member

Nachrichten: 34

Eintrittsdatum: 23. November 2007

Neue 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
RE: How to i restrict user from creating his own private and public page?
4. Oktober 2009 21:45
Antwort

vikas suresh thakre

Rang: Junior Member

Nachrichten: 97

Eintrittsdatum: 18. Mai 2009

Neue 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...
zaheer mohammed saddapalli
RE: How to i restrict user from creating his own private and public page?
4. Oktober 2009 22:44
Antwort

zaheer mohammed saddapalli

Rang: Regular Member

Nachrichten: 165

Eintrittsdatum: 15. Januar 2008

Neue Beiträge

Hi Vikas,

To hide My Pages option form control panel.

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

 1
 2<portlet>
 3        <portlet-name>140</portlet-name>
 4        <icon>/html/icons/default.png</icon>
 5        <struts-path>my_pages</struts-path>
 6        <portlet-url-class>com.liferay.portal.struts.StrutsActionPortletURL</portlet-url-class>
 7        <control-panel-entry-category>my</control-panel-entry-category>
 8        <control-panel-entry-weight>2.0</control-panel-entry-weight>
 9        <control-panel-entry-class>com.liferay.portlet.mypages.MyPagesControlPanelEntry</control-panel-entry-class>
10        <use-default-template>false</use-default-template>
11        <restore-current-view>false</restore-current-view>
12        <private-request-attributes>false</private-request-attributes>
13        <private-session-attributes>false</private-session-attributes>
14        <render-weight>50</render-weight>
15        <header-portlet-css>/html/portlet/communities/css.jsp</header-portlet-css>
16        <header-portlet-css>/html/portlet/enterprise_admin/css.jsp</header-portlet-css>
17        <css-class-wrapper>portlet-enterprise-admin</css-class-wrapper>
18        <system>true</system>
19    </portlet>



with

 1
 2
 3<portlet>
 4        <portlet-name>140</portlet-name>
 5        <icon>/html/icons/default.png</icon>
 6        <struts-path>my_pages</struts-path>
 7        <portlet-url-class>com.liferay.portal.struts.StrutsActionPortletURL</portlet-url-class>
 8        <!--<control-panel-entry-category>my</control-panel-entry-category>-->
 9        <!--<control-panel-entry-weight>2.0</control-panel-entry-weight>-->
10        <!--<control-panel-entry-class>com.liferay.portlet.mypages.MyPagesControlPanelEntry</control-panel-entry-class>-->
11        <use-default-template>false</use-default-template>
12        <restore-current-view>false</restore-current-view>
13        <private-request-attributes>false</private-request-attributes>
14        <private-session-attributes>false</private-session-attributes>
15        <render-weight>50</render-weight>
16        <header-portlet-css>/html/portlet/communities/css.jsp</header-portlet-css>
17        <header-portlet-css>/html/portlet/enterprise_admin/css.jsp</header-portlet-css>
18        <css-class-wrapper>portlet-enterprise-admin</css-class-wrapper>
19        <system>true</system>
20    </portlet>



Hope this will help

With Regards,
Saddapalli Mohammed Zaheer
zahid khan
RE: How to i restrict user from creating his own private and public page?
4. Oktober 2009 22:46
Antwort

zahid khan

Rang: Regular Member

Nachrichten: 116

Eintrittsdatum: 30. Juli 2008

Neue 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
Jerry Niu
RE: How to i restrict user from creating his own private and public page?
4. Oktober 2009 22:59
Antwort

Jerry Niu

LIFERAY STAFF

Rang: Expert

Nachrichten: 451

Eintrittsdatum: 21. Juni 2006

Neue 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:
 1
 2##
 3## Admin Portlet
 4##
 5
 6    #
 7    # Input a list of default role names separated by \n characters.
 8    #
 9    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
RE: How to i restrict user from creating his own private and public page?
5. Oktober 2009 01:38
Antwort

Axel Nagel

Rang: New Member

Nachrichten: 20

Eintrittsdatum: 2. September 2009

Neue 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.


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



That worked fine for me.
vikas suresh thakre
RE: How to i restrict user from creating his own private and public page?
6. Oktober 2009 23:30
Antwort

vikas suresh thakre

Rang: Junior Member

Nachrichten: 97

Eintrittsdatum: 18. Mai 2009

Neue 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.


1
2layout.user.private.layouts.enabled=false  //activate Personal Community with *private* pages
3layout.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
RE: How to i restrict user from creating his own private and public page?
7. März 2010 09:45
Antwort

LOrDxx ThEGreat

Rang: New Member

Nachrichten: 2

Eintrittsdatum: 7. März 2010

Neue 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 _
RE: How to i restrict user from creating his own private and public page?
8. Dezember 2010 05:11
Antwort

gofri _

Rang: Junior Member

Nachrichten: 92

Eintrittsdatum: 2. März 2007

Neue 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
RE: How to i restrict user from creating his own private and public page?
8. Dezember 2010 11:25
Antwort

Nicholas Tenczar

Rang: Junior Member

Nachrichten: 53

Eintrittsdatum: 14. Juli 2010

Neue 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.