User and Roles

Summary

rights1.jpg

  • Every Phenotype backend users has specific rights
  • These rights are split up into elementary rights (like allowance of accessing mediabase) and application specific rights (like allowance of editing records of content class xy)
  • Furthermore righs are combined in roles, and users can get assigned to roles, so they retrieve the rights of a role too.
  • Rights of roles are always additive, you cannot limit the rights of an user by assigning him to a role
  • If you have admin rights, you can admin your rights and roles yourself
  • One right is not administrable. Superusers must be set in the database

PhenotypeUser

Since all rights are backend related, you need to access an Phenotype Backend User, therefore you need it’s ID:

$myUser = new PhenotypeUser(13);

The current user is always available as a global object (only in backend!):

global $mySUser

Following methods might be of interest: For more details check the API documentation and read the background information on rights.

  • →getName($usr_id = - 1)
  • →getRights($usr_id = -1)
  • →hasRight($key)
  • →hasRole($nr)


Continue with information on general application setup...

You think Phenotype Wiki/Documentation could be better?
We too. Please contribute: Edit this page

Bookmark and Share