91
91
type.__setattr__(Role, Role._roles[i].upper(), Role(i))
92
92
Role._roles_to_int[Role._roles[i]] = i
94
### CAPABILITIES LISTING ###
94
96
# Set of capabilities, which maps global variables onto Roles.
95
97
# This provides the minimum role level required in order to perform the given
97
99
# (So any role above the role specified can perform this cap).
101
# Create users (the users are able to log in and accept)
99
102
CAP_CREATEUSER = Role.ADMIN
103
# Get details about users
100
104
CAP_GETUSER = Role.LECTURER
105
# Change all details of a user
101
106
CAP_UPDATEUSER = Role.ADMIN
108
# Posting to subject blog for subjects you are teaching
109
CAP_BLOGPOST = Role.TUTOR
111
# Reading submissions (both tutorial and assignment) of student for whom you
113
CAP_READ_MY_STUDENTS_SUBMISSION = Role.TUTOR
114
# Reading all students' submissions (in subjects you have this cap for)
115
CAP_READ_SUBMISSION = Role.LECTURER
117
# Reading marks for your own students
118
CAP_READ_MY_STUDENTS_MARKS = Role.TUTOR
119
# Adding marks info for your own students (can't delete or edit, only add)
120
# (You can overwrite marks but old ones will be logged).
121
CAP_WRITE_MY_STUDENTS_MARKS = Role.TUTOR
122
# Reading marks for all students
123
CAP_READ_MARKS = Role.LECTURER
124
# Adding marks info for all students
125
CAP_WRITE_MARKS = Role.LECTURER
127
# Reading any student's svn (in subjects you have this cap for)
128
CAP_READ_SVN = Role.LECTURER
129
# Writing to any student's svn
130
CAP_WRITE_SVN = Role.LECTURER
132
# "SuperUser" role - certain users are granted "sudo" powers on the Unix
133
# system, giving them abilities beyond what is granted here in IVLE.