yii2 Access rule

hi,

i have

yii2 access problem i want to avoid that an user acess the data of other for example with

web/index.php?r=etablissement%2Fupdate&id=1 when i put id=2 it show the data of other person

thank

Try a different approach.

Create an action called ‘updateOwn’ with no arguments, and use the id from identity to load the record.

it is ok, if i do it like your approch

bur i want to know if it is possible to manage this with rbac.

and so when i connect with a user and i want to come to http://root/index.php

it return to first public home page and not to the private home page (profile)

thank

It is possible.

Create a rule that checks if the user is identical to the id, or something.

There is an example of an ‘edit own post’ rule in the Yii Guide.

ok!

but i want also to know if you are response for this question

and so when i connect with a user and i want to come to http://root/index.php

it return to first public home page and not to the private home page (profile)