官术网_书友最值得收藏!

Understanding Roles, and Assigning Rights

The default Drupal installation comes with two standard roles: anonymous user and authenticated user. The anonymous user is used for any non-members visiting the site, and anonymous users generally have limited rights on a site used for a learning environment. All site members belong to the authenticated user role; consequently, any permission granted to the authenticated user role is given to every site member. In Chapter 2, we assigned privileges to the authenticated user role. As discussed in Chapter 4, the rights assigned to user roles are cumulative; therefore, if a single user is assigned to multiple roles, that user has the accumulated permissions of all roles.

On small sites, some site administrators use the authenticated user role to assign permissions to students. From a technical perspective, this will work, but creating a specific student role (as we did in Chapter 3) provides an additional level of security and flexibility. Later in this chapter we will assign specific rights to the student role.

We will leave the authenticated user role with relatively few rights, and assign more rights to the student role. When working with students under the age of 18, this added level of security can be reassuring to concerned parents. The practice of assigning limited rights to the authenticated user role means that even if someone outside of the course creates an account on the site, they still won't have the ability to do anything until their account has been vetted and approved by a site administrator.

Additionally, as the site grows, it can be useful to use roles to organize users into groups. As an example, let's examine the possibility of inviting parents into the site. If the authenticated user role was being used to control the access rights of students, then all parents would be able to behave exactly like students within the site. By using a separate student role and leaving the authenticated user role untouched, parents can be given a different set of rights than their children.

Unfortunately, Drupal's access rules cannot be similarly extended to govern parent behavior in the brick and mortar classroom.

主站蜘蛛池模板: 治多县| 桃园市| 安丘市| 元江| 调兵山市| 平武县| 文安县| 长岭县| 兴化市| 大同市| 德安县| 蛟河市| 丰县| 合水县| 灌云县| 侯马市| 平果县| 雅江县| 依兰县| 望谟县| 樟树市| 桃园市| 托克逊县| 武穴市| 平武县| 英山县| 襄垣县| 法库县| 邹平县| 若尔盖县| 凌海市| 广南县| 重庆市| 白城市| 嘉黎县| 施甸县| 景德镇市| 祁门县| 浑源县| 蓝山县| 乌什县|