Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Conditional Visibility During Create of Item. View modes: 
User avatar
Member
Member
tony.j.clark-gmail - 11/5/2012 3:29:20 PM
   
Conditional Visibility During Create of Item.
I want to allow Users in a given role to be able to create a Group. Once that group is created I want only users in a more restricted role to be able to edit certain files.

Is there a way for me to check if the Group dialog is in Edit mode vs Create mode and apply conditional visibility based on that.

User avatar
Member
Member
davids-kentico - 11/6/2012 1:11:52 AM
   
RE:Conditional Visibility During Create of Item.
Hi, you want them to be able to create groups from the UI, right?

Just FYI, here's how you can set that up easily on the live site using a web part

Otherwise you'll have to dig in to the dialog's code. The dialog is in edit mode when it receives a group id in the query string. So no group ID means a new group is being created. You'll then need to select the role the current user is in and check if this is the role you want to allow/restrict actions in the dialog.

Or you can create a new permission in the Groups module and check your users against that.

Let me know if you neeed a detailed explanation with code examples, I'll be happy to provide them.

User avatar
Member
Member
tony.j.clark-gmail - 11/8/2012 1:05:57 PM
   
RE:Conditional Visibility During Create of Item.
Hello,

I was hoping there was a macro available or a macro that I could create without touching the code that I could use to hide/show fields during the user group create.

Changing the web part is not a problem, I just wanted to avoid that.

Thanks.
Tony

User avatar
Member
Member
davids-kentico - 11/14/2012 7:17:19 AM
   
RE:Conditional Visibility During Create of Item.
Hey, I'm still not sure what you're trying to accomplish.

You can allow users on your site (live site, not the management UI) to create a group using the Group registration web part. That will show a form where you fill in the group's properties and create it. The web part also incorporates an approval process so you can control what the users are creating.

There's an entire set of web parts for managing groups, so if you don't want users to edit groups (again, we're talking about the live site) don't use these on your site.

You can find some examples on these in the Community site guide.

If you want your users to create groups from within CMS Desk -> Tools -> Groups, that's a whole different story.

You create groups on the page /CMSModules/Groups/Tools/Group_New.aspx and there's a whole set of pages that allow you to manage the various components of a group.

If you want your users to only create groups, you need to edit the management pages in such a way that would deny access to users that you don't want to edit groups.

To do that, I would recommend you create a new permission for the Groups module, call it 'Create' and check it in the Group_New page's code and give it to users who you want to be able to create pages. Then you can use the already existing Manage permission to grant access to group editors.

To conclude - if you want to do this from the live site, then you don't need to change any web parts, or use any macros. If you want this to happen from the UI, you will need to adjust the code of some pages.