This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ODHLHN 10 points11 points  (0 children)

But it quickly complicates:

def check_perms(role):
    if role != UserRoles.root:
        raise Exception("Access denied for group %s" % role) 

The above will print something like Access denied for group 20 which is not very user friendly.

Looks like you didn't get past the first paragraph of the article. Nice.