Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skills (permissions) #4

Closed
trebidav opened this issue Mar 15, 2024 · 0 comments · Fixed by #41 or #43
Closed

Skills (permissions) #4

trebidav opened this issue Mar 15, 2024 · 0 comments · Fixed by #41 or #43
Labels
Milestone

Comments

@trebidav
Copy link
Owner

trebidav commented Mar 15, 2024

User has Skills that work as permissions that allow him/her to interact with Tasks [read, write, execute]. By assigning a read skill to Task, User who has the assigned skill in his skillset can view Task object (on map and in the list) and read its details. Write should also allow User to review Task completion. Owner of the task should be always able to have Write permissions and not Execute permissions. Execute means User can start() and finish() a Task

example Skill:

Skill("Bartender")
Skill("Chief Bartender")

example Task:

Task(name="Bar", 
        respawn=True,
        hourly=True,
        value=10,
        start=datetime.time("10:00AM"), end=datetime.time("1AM"),
        days=[1-6],
        enabled=True,
        read=[Bartender, Chief Bartender]
        write=[Chief Bartender]
        execute=[Bartender, Chief Bartender]
    )
def start_task(request, task)
    user = request.user
    if  user.has_skill(task.execute):
        user.acquire(task)
        task.start()

@trebidav trebidav added enhancement New feature or request rbac and removed enhancement New feature or request labels Mar 15, 2024
@trebidav trebidav changed the title Implement skills (permissions) Skills (permissions) Mar 15, 2024
@trebidav trebidav added the good first issue Good for newcomers label Nov 10, 2024
@trebidav trebidav added this to the MVP milestone Nov 13, 2024
This was linked to pull requests Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant