errata for book?

Home Forums Learn ZF2 errata for book?

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  matt 2 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #329

    matt
    Participant

    I’m enjoying the book and it’s been a huge help in getting me going with zf2.

    I’m wondering if an errata page is in order.

    For example, I’ve got the code working, registered an account and set the role to be ‘admin’, but when I try to access exam/test/reset, I get:

    You do not have access to this page.Log in with user that has the correct access.

    Looking at the exam/config/module.config.php from the book, I see:

    'allow' => array(
          ...
          array('admin', 'test', 'reset')

    but in your code (https://github.com/slaff/learnzf2/blob/master/module/Exam/config/module.config.php) I see:

    'allow' => array(
                ...
                array('admin', 'test', array('reset','certificate')),

    Currently, neither array structure gives me access to resetting.

    I keep finding little things like that. Naturally, I make enough mistakes on my own and don’t want the extra burden. Thus, an errata page seems to be in order.

    #330

    Slavey Karadzhov
    Participant

    Hi Matt,
    I will split your question into two issues that you are reporting:

    Code in book not equal to code in git:

    What you are pointing to is the final state of the source code. But there are a lot of stages before we reach this state. They are marked as git “tags”. The place where the code in the book and the source code in git are close is here:
    https://github.com/slaff/learnzf2/blob/ch-exam-reset/module/Exam/config/module.config.php#L81

    Admin not being able to login:

    Now for the admin not able to access the page: the best will be to put the code that you have in github so that I can fork it and take a look at it.

    #334

    matt
    Participant

    Thanks for your response.

    I need to get my debugging working correctly so I can step through the code. Doing a var_dump on the user, I saw the role was “member” instead of as it was set in the db as “admin”. I’ll get a github commit eventually, but I’d hate to bother you over something prematurely.

    Thanks!

    • This reply was modified 2 years, 11 months ago by  matt.
    #336

    matt
    Participant

    It is working now, so I suspect an issue with the session on my part. That is, I didn’t delete my session cookie after updating the role in the db.

    Thanks.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.