file permision

Permalink
can anyone help me setting up file permissions,
In the documentation there is a function called assignPermision(),
but i think that is for older verions
so if anyone can help i would appreciate
e.g: after a page is published by the admin, I would like to give permissions to the access those images to some users, but images will not be grouped in sets