3. CRUD
• You can control who has the ability to do what
You define who has the ability to
– Read (View)
– Create
– Update
– Delete
Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 3
4. Roles
• Categories for authenticated users
• No limitations on the number of roles you set
• No limitations on the naming you give
• Any authenticated user of your website may
be assigned to none, one, or more than one
role
Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 4
5. 2 main types of roles
• Anonymous users
– Do not enter credentials to enter the website
• Authenticated users
– Enter user ID and password to access more
functionalities or content
Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 5
6. Permissions
• Permissions in Drupal are a mechanism for
controlling what a user assigned to a specific
role can do.
• There are dozens of permissions – be careful!
• Examples:
– Create a page
– Edit/edit own page, etc
Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 6
7. User accounts
• All Drupal websites have at least one user
account: the system administrator
• 3 ways to work out new accounts:
– Users create their new accounts with no
administrator moderation
– Users create their new accounts, but
administrator approval is needed
– Only administrator can create new accounts
Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 7
8. Which is the best option for us?
Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 8
9. Account settings
• Make sure you review Account settings page
on every new Drupal website you make
• URL: ../admin/config/people/accounts
• For our case, let’s change the “Who can
register accounts?” option to “Administrators
only”
Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 9
10. Creating a new role
> Administration
> People
> Permissions
> Roles
Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 10
11. Set permissions on the role
• Comment: check all
• Contextual links: Use contextual links
• Filter: User the Filtered HTML text format + Use the
Full HTML text format
• Menus: Administer menus and menu items
• Node: Administer content + Access the content
overview page + View published content + View own
unpublished content + View content revisions + Article:
Create new content + Article: Edit own content +
Article Delete own content + same for Basic page
• Search: use search
Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 11
12. Creating User Accounts
• Administration > People or
• ../admin/people
Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 12