yii2-gii icon indicating copy to clipboard operation
yii2-gii copied to clipboard

Add default access control for controller methods

Open joshijitendra opened this issue 8 years ago • 5 comments

Q A
Is bugfix? no
New feature? yes
Breaks BC? no

joshijitendra avatar Dec 19 '16 07:12 joshijitendra

Does not make sense to me. Would you please explain why the change is required?

samdark avatar Dec 19 '16 12:12 samdark

This adds getting started code for access control filter which can improved further as required and saves time for having to add it manually for CRUD generator. Also it is in line with yii1 gii which has similar behaviour to add a default access control filter.

I am open to any better implementation/suggestion.

joshijitendra avatar Dec 19 '16 20:12 joshijitendra

I am for adding this because nearly all crud needs some access control and this way it is less likely to be forgotten. It could be configurable somehow. not sure how though.

cebe avatar Dec 19 '16 21:12 cebe

Thinking about it once again, it should be OK.

samdark avatar Dec 25 '16 17:12 samdark

Maybe make sense do this feature optional?

Sensetivity avatar Jun 18 '21 13:06 Sensetivity