Unlimited Plugins, WordPress themes, videos & courses! Unlimited asset downloads! From $16.50/m
by
Lessons:33Length:3.7 hours
Drupal 8 1
  • Overview
  • Transcript

4.2 People, Roles, and Permissions

When your site gets huge and is the next big thing on the internet, you're going to need additional people to help you maintain and moderate its content. When that time comes, you'll need to understand how to add users to your site, how to work with permissions, and ultimately how to tie these two together in roles. In this lesson, that is exactly what you'll learn to do.

4.2 People, Roles, and Permissions

Now we're getting to the last couple sections of the overview portion of this course. When it comes to dealing with the creation and the administration of your Drupal site. Now over time, you're gonna find yourself dealing with the fact that it is a lot of work to be able to constantly come in and administer your site. And it would definitely be much easier if you had people to help you. Or to be able to allow people certain types of permissions within your site. And that's when it would really be beneficial for you to understand the People section of the administrative toolbar. So let's go ahead and click on People and let's see what we can do here. Now it's important to understand when you are working with a Drupal site that there is kind of a flow of the way that all of this works. And that goes as people belong to roles that contain certain permissions. So let's kind of pick this all apart a little bit at a time. So the first thing that you see here is a list of people that have access to your site. Or a list of people that are known to your site. And since we created this site by default, we were given that first administrative user, that user number one. The user that has the absolute highest level of permissions within your site. And that person is listed right here as admin and is assigned the role of administrator. So what exactly does that mean? Well let's start by digging into Roles. Now when I look into Roles, you're gonna see a list of these roles. I have anonymous user, which means this user has navigated to my website but they have not logged in. And I have no idea who this person is or any information about them. Then we have the Authenticated user. Which means at some point along the line this user has created an account within my site. And that person has actually logged in. So I know at least a little bit about them. Because, well, at some point they have registered and they've logged in. And I kind of know at least at a very high level who this person is. And then I have an administrator which is obviously a super user type of an account who has a lot more things as in permissions to be able to do around my site. But what exactly are these permissions? Well, let's come over and take a look at the Permissions tab. Now it's important for you to understand that over the lifetime of your site with the more content types you create and the more blocks you create and the more functionality that you continue to add to your site, this list of permissions is going to continue to grow and grow and grow and get longer and longer and longer. Now I don't say that to deter you from coming here. I'm just telling you that it's important to come back to this Permissions page every so often as your site continues to grow. And you begin to add new types of content and new structure to your application. Because you're gonna need to be able to manage these permissions and assign them to roles. And give these roles to only certain people to make sure that you are keeping the security of your website at least from a person perspective to the utmost regard. So, if you were to take a look at this. You could scroll down and see lots of different permissions here for many different sections of your site. Maybe a person that could administer blocks or different things that can be done with comments. Or with contacts or with the field UI, or a whole different slew of things. And it's important to kind of keep all of these things in mind. So are we limited to just this when it comes to the roles? Cuz I see I can assign these things to an anonymous user, authenticated, administrator. And the answer to that is, no, you are always free to continue to add roles. And I would definitely consider this as an opportunity to make sure that you really think about the types of things that you want certain individuals to be able to do. So let's say your site is gaining in popularity. And all of a sudden now you are really beginning to get bogged down in the managing of certain aspects of your website. And we would like to bring somebody else in to be able to help you with certain things. Now you don't want to just throw that person in the Administrators role. Because then they're going to be able to do a lot more than you really want them to do. So I would definitely encourage you at that point to create a new role. And maybe let's say, for instance, I want to have somebody to be able to come in and only administer the blocks that are found within my site. And that's all that I want this person to do there. Strictly worried about the blocks in the structure and where things are going to go. This type of block belongs in this region or whatnot. And that's going to be this person's entire job. So the way that you would do that is you would come over to Roles. And I would say I want to add a new role. And I would just call this the Block Manager maybe. And I can go ahead and hit Save on this. And now we're gonna see that I have a Block manager in here. So I can come over to my permissions and you can see the Block Manager shows up here now. And I could say I only want this person to be able to administer blocks. And they really have very little other access to do everything else. Other than they could do basic things that an authenticated user could do. So as you can see here an authenticated user can post comments, skip comment approval, and view comments. And that's exactly what's going on over here. So the assumption that's being made here is that this block manager is basically an authenticated user that we're going to slightly modify their permissions by allowing them to administer blocks. So once I have modified all of this and I have finished that I can go ahead and Save permissions. And now I am free to go back to my list of people here. And then I can come into my operations and I could edit that user. And I could come down here and I could take a look at the role section. And I could assign this person as a block manager and kind of add and remove things as necessary. So, that is the basic flow of being able to create roles and permissions to them and then choose users to put into those roles.

Back to the top