Skip to content

Change pundit create? to only create record if user is owner #209

@philipeleandro

Description

@philipeleandro

Currently, the create? method checks only if user is present, but this behavior permits that another authenticated user can creates records to another user.

  • You check if this bevahior happens
  • Improve method to only permits that the user who is creating a record be the owner of this record and the user can't create record to other user.

Help: https://github.com/varvet/pundit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions