Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write an SML program (users.sml) that computes the permissions for all the users in a course (students, graduate TAs, undergraduate Tas, graders and instructors). This
Write an SML program (users.sml) that computes the permissions for all the users in a course (students, graduate TAs, undergraduate Tas, graders and instructors). This is called the role-based access control (RBAC) problem. It is used in operating systems (user, groups, permissions to folders and files), databases, etc. We consider the following sets: USERS set of users ROLES set of roles PERMS set of permissions UR set of user-role pairs is subset of USERS ROLES RP set of role-permission pairs is subset of ROLES PERMS RR set of pairs of roles, called ascendant and descendant roles, where an ascendant role inherits all permissions from a descendant role This role hierarchy is transitive (15 points) Write a function authorizedRoles(User, ListUserRole Tuples, ListRoleRoleTuples) that returns the set UserAuthorizedRoles (represented as a list) of roles that user has. (15 points) Write a function authorizedPermissions(User, UserAuthorizedRoles, ListRolePermission Tuples) that returns the set UserAuthorizedPermissions (represented as a list) of permissions that user has. Write an SML program (users.sml) that computes the permissions for all the users in a course (students, graduate TAs, undergraduate Tas, graders and instructors). This is called the role-based access control (RBAC) problem. It is used in operating systems (user, groups, permissions to folders and files), databases, etc. We consider the following sets: USERS set of users ROLES set of roles PERMS set of permissions UR set of user-role pairs is subset of USERS ROLES RP set of role-permission pairs is subset of ROLES PERMS RR set of pairs of roles, called ascendant and descendant roles, where an ascendant role inherits all permissions from a descendant role This role hierarchy is transitive (15 points) Write a function authorizedRoles(User, ListUserRole Tuples, ListRoleRoleTuples) that returns the set UserAuthorizedRoles (represented as a list) of roles that user has. (15 points) Write a function authorizedPermissions(User, UserAuthorizedRoles, ListRolePermission Tuples) that returns the set UserAuthorizedPermissions (represented as a list) of permissions that user has
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started