Access Control Lists (ACL)

Socialveo provides an easy and lightweight management of ACLs as well as the permissions attached to them. ACLs allow an application to control access to its areas and the underlying objects from requests. You are encouraged to read more about the PhalconPHP Access Control Lists methodology so as to be familiar with its concepts.

In summary, ACLs have roles and resources. Resources are objects which abide by the permissions defined to them by the ACLs. Roles are objects that request access to resources and can be allowed or denied access by the ACL mechanism.

Introduction

Socialveo have three main roles:

  • ACL_ALL
  • ACL_GUEST
  • ACL_USER
  • ACL_ADMIN

Plus there are other specific roles used for give access to certain resource, which are:

  • ACL_OWNER
  • ACL_NOT_OWNER
  • ACL_ACTIVE_USER
  • ACL_PUBLIC_PROFILE
  • ACL_USER_HAS_ACCESS
  • ACL_USER_HAS_ACCESS_COMMENT
  • ACL_USER_HAS_ACCESS_COMMENT_TARGET
  • ACL_USER_HAS_ACCESS_TARGET
  • ACL_OWNER_TARGET
  • ACL_REQUIRE_TARGET
  • ACL_NOT_OWNER_TARGET
  • ACL_USER_HAS_ACCESS_UUIDS
  • ACL_USER_LOCKED
  • ACL_USER_NOT_LOCKED

How to override default Socialveo ACL

Inside socialveo/config/acl.php you can find Socialveo default roles and resources. For override defaults roles and resources, or for add your own, inside configuration file add below config:

'acl' => [

    'configFile' => SOCIALVEO_CONFIG_DIR . '/acl-custom.php',

],

And then create your custom acl-custom.php file inside socialveo/config/acl.php.

See socialveo/config/acl.php how to make the file.

Happy coding!

Was this article helpful?

Related Articles

Leave A Comment?

You must be logged in to post a comment.