Hi,
I’m hoping someone can help me. There appears to be some discrepancy between what is in the book and what is in the sample code.
First of all the sample code doesn’t appear to have the functionality for hasPermission() in Author.php (in the Entity folder) or savePermission() at all in the Register.php controller and there doesn’t appear to be a next section of sample code to review from there.
I have coded my files exactly as the book says (though I believe there’s a missing variable declaration in Author.php as $this->permissions isn’t declared in the class, but used in hasPermission().
I have set my personal author permissions to 63 which should give me permissions to everything. However, when I attempt to go to http://192.168.10.10/category/list, I get a access denied page.
My code is here if anyone else wants to try it. Sorry, I don’t have sample data to go with mine, but you can get some at https://github.com/spbooks/phpmysql6/tree/Relationships-BinaryPermissions.
I truly am stumped here and can’t continue until I figure this out. Thanks in advance!
Jen