Skip to content

[BUG] Permisje w SharedQuiz #185

@MoonPrincess06

Description

@MoonPrincess06

W 'IsSharedQuizMaintainerOrReadOnly' znalazłam to:

def has_permission(self, request, view):
  if not request.user.is_authenticated:
      return False

  account_type = getattr(request.user, "account_type", None)

  if request.method in permissions.SAFE_METHODS:
      return account_type in self.CAN_VIEW_SHARED

  return account_type in self.CAN_SHARE

problem w tym, że tu jest tylko sprawdzany typ konta, a nie, czy tej osobie powinno być wolno udostępnić ten quiz

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions