Skip to content

MEAP v17. Chapter 8, Listing 8.15 Assigning permission #6

@mikezx6r

Description

@mikezx6r

I'm having a problem following examples and understanding how it works.

The permissions in the book seem to verify as to whether they have an underscore in them or not.

Verifying permissions, the code has 'create tickets', and yet the checkboxes on the screen appear to be using 'create_tickets'. I don't see anywhere where one gets converted to the other.

If I write my app as per the book, the permissions don't work correctly. As soon as I modify the can? and cannot? entries to include the underscore, everything works correctly.

I was asked to link to a Github repo, but I prefer Bitbucket.

https://bitbucket.org/mikezx6r/ticketee

Commits d1fded8 and f96f93d demonstrate the issue

I've also found the assigning_permissions_spec, 'Creating tickets for a project' doesn't appear to be testing the code. I can comment out the 'check_permission' for create_tickets and the test still passes.

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