Permissions Changed?

Permalink
I am using block permissions to alter the content of a certain block.

public function view(){
$b = Block::getByID($this->bID);
$bp = new Permissions($b);

$this->canWrite = $bp->canWrite();
$this->set('canWrite', $bp->canWrite());


When a user "canWrite" some extra things are shown on the block. The users do not have edit permissions on the page the block is on.

Previously this worked. But I have updated to 5.6.0.2, and now the canWrite is false for the users with write access on that block.

Did something change? How can I get this behavior back?

 
rklomp replied on at Permalink Reply
kick
andrew replied on at Permalink Reply
andrew
Not really sure what is going on with this. canWrite() should check the block object even though the method itself has been replaced with other methods. I would doublecheck that permissions are set correctly on the block and try clearing cache. If it's not working I'd try swapping out canWrite() with canEditBlock() and see if that works.
rklomp replied on at Permalink Reply
I have rechecked everything. Both canWrite() and canEditBlock() give the same result. Both function return false while the user has "Edit Block" permissions on the block.

The user does not have "Edit Contents" permissions on the page the block is on. As soon as is give those permissions to the user the canWrite() and canEditBlock() functions return true.

I have been reading the c5 source but have not been able to trace the reason yet.
rklomp replied on at Permalink Reply
This problem still exists for me when I use 5.6.1b4