-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser_privileges.py
More file actions
39 lines (30 loc) · 1.16 KB
/
user_privileges.py
File metadata and controls
39 lines (30 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
################################################################################
# Description: Programs provide the user's profile including name, email, and privs
################################################################################
class Privileges:
def __init__(self, privs = ['interact', 'post', 'comment', 'edit', 'ban']):
return
# sets list of strings 'interact', 'post', 'comment', 'edit', 'ban'
# takes a string parameter, add that string to set of privs and print granted
def grant(self):
print('Granted')
return
# takes a string parameter, remove string from set of privs and print revoke
def revoke(self):
return
# takes a string paramets, remove string from set of privs in alph as comma separated
def get_privs(self):
return
class User:
def __init__(self, name, email, privs):
self.name = name.capitalize()
self.email = email
self.privs = privs
return
def describe_user(self):
print('Name: ' + self.name)
print('Email: ' + self.email)
print('Privs: ' + self.privs)
def main():
if __name__ == '__main__':
main()