Hi,
I have created many apps using Yiis Authorisation methods etc and all have worked fine, only this time I have encountered a problem I have had before. The nature of the problem indicates I must have done something wrong somewhere but I do not know where.
Here is the code …
array("allow",
"controllers" => array("casecollection"),
"actions" => array("update"),
"roles" => array("casecollection-update")
),
array("allow",
"controllers" => array("casecollection"),
"actions" => array("delete"),
"users" => array("*")
),
// casenote
array("allow",
"controllers" => array("casenote"),
"actions" => array("create"),
"roles" => array("casenote-create")
),
array("allow",
"controllers" => array("casenote"),
"actions" => array("update"),
"roles" => array("casenote-update")
),
array("allow",
"controllers" => array("casenote"),
"actions" => array("delete"),
"roles" => array("casenote-delete")
),
See the case-note delete method, that is only working if casecollection-delete is true. Also the casenote-update only works if the casecollection-update method is true. The same also applies at the database level, if I put return 1; in the casecollection-update part the casenote-update will then work. If I put return 0; in the casecolletion-update part then it will not work. All it shows is a white screen as well when not working not any authorisation error message.
So what I am saying the "delete" and "update" methods only work if the previous "delete" and "update" method works even though it is completely separate controller in the code.
Anyone ever encountered this problem? Anyone know how to fix?