In my previous post I mentioned how to create a blog site using templates, containers and contents in dotCMS. After the site has been created you need to add posts to it so that it can go publishing all its posts.
By default the content created contains the permissions of their parent structure. However in most of the cases it is required to give certain permissions to certain group of users/roles. In our case we will create a user mysiteuser and assign it a group mysitegroup. We will also create a role called mysiterole and this role will be granted to mysitegroup.
Using this as an example we will allow users having mysiterole only to add content/post to the blog just created.
1. Add New Role
Click on CMS Admin link and chose New -> Role from the drop down. This will lead to a screen where you can add a new role named as mysiterole.
2. Add New Group
Click on CMS Admin link and chose New -> Group from the drop down. This will lead to a screen where you can add a new group named as mysitegroup.
3. Add New User
Click on CMS Admin link and chose New -> User from the drop down. This will lead to a screen where you can add a new user named as mysiteuser by filling all its details.
4. Assign Role to mysiteuser.
Click on CMS Admin link and chose Users. This will show a screen containing search button. Click on Search button. It will populate the newly created user mysiteuser. Select the user and click on User Roles tab from the screen. Now there will be a screen showing available and current roles.
Chose CMS User Role from Available to Current list. This role is important because of this is the parent role of all dotCMS editing roles.
5. Assigning Group to mysiteuser.
Click on CMS Admin link and chose Users. This will show a screen containing search button. Click on Search button. It will populate the newly created user mysiteuser. Select the user and click on User Groups tab from the screen. Now there will be a screen showing available and current group.
Chose CMS Users group from Available to Current list.
6. Adding Role mysiterole to mysitegroup.
Click on CMS Admin link and chose Permissions -> Groups. This will show a screen containing newly created group mysearchgroup in the left side. Click on mysitegroup. It will enable few options downwards. Click on Edit Roles button. It will open a screen containing available and current roles for th group. Select mysiterole from the available list and click update button.
7. Editing pages for the role
Click on CMS Admin link and chose Permissions -> Groups. This will show a screen containing newly created group mysearchgroup in the left side. Click on mysitegroup. It will enable few options downwards. Click on Edit Pages button. It will populate a screen as follows.
Inside the Add New Page text box write the name of content "Content" and click on Update Page Settings button. It will now reflect a new screen downwards as follows.
Click on Selected Page "Content" from the drop down menu and click on Content Management link under categories tab. Now select Content Search Manager(n) from the list of checkboxes. Click on Update Content Settings button to make changes permanent.
8. Change the permissions of Blog structure.
Click on Structures link and chose structures. This will show a screen containing all structures. Click on Blog. Then click on Permissions tab and check mysiterole and CMS Anonymous role under View column.
9. Change the permission of the Blog Entry structure.
Click on Structures link and chose structures. This will show a screen containing all structures. Click on Blog Entry. Then click on Permissions tab and check View, Modify and Publish permissions to mysiterole. Also give View permission to CMS Anonymous role.
This now completed the assigning permissions and role to a blog site. Now only user mysiteuser will be able to create a blog post when logged into the system. After you login to the system as mysiteuser it will look like as follows.
By clicking on Add New Content and selecting Blog Entry from the drop down you will be able to go to following screen where you can write your contents of post.
After you are done with writing your changes, you need to relate this blog post with one of the blogs. You can do it by going to relationship tab and clicking on Relate Content button. This will populate a search screen. You need to search for the relevant blog and relate content.
Sphere: Related Content
0 comments:
Post a Comment