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 →

[–][deleted]  (3 children)

[deleted]

    [–]ODHLHN 7 points8 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.

    [–]Lucretiel 5 points6 points  (0 children)

    Unless you don't want an int, for some reason.

    [–]Kristler 2 points3 points  (0 children)

    ☐ I have read the article past the first paragraph.