structure and process

obliquid edited this page Dec 13, 2011 · 5 revisions
  • elements

    • there are 2 kind of elements a registered user can manage:
      • structure elements:
        • sites: which are composed by:
        • layouts: which are composed by:
        • divs: wich can be containers or:
        • modules: which are composed by:
          • models
          • views
          • controllers
      • content elements:
        • these are the contents for a given model: for example if you created a model employee (with its name, job, salary, etc.), contents are all employees loaded for that model. contents are instances of the object employee.
  • elements authorship

    • when a user create an element (structures or contents), automatically he become author of that element.
    • right now authorship of an element could not be changed
    • superadmin cannot create anything, it can only modify/delete elements created by registered users
  • elements status

    • when a user creates an element (structures or contents), it must assign a staus to it:
      • private:
        • only author can see it
      • public:
        • element is published on author's sites pages, but not in admin pages
      • share
        • everybody could see it, in author's sites, and in admin pages
  • roles

    • a role has a name (ex.: news administrator), and a list of permissions
  • permissions

    • as stated above, by default all structure elements are bound to their authorship: when a user create a structure element, he and only he can modify/delete it
    • permissions apply only to models (which are one of the structure elements)
    • by default a user create a model (ex.: employee), and has create/modify/delete permissions on all contents for that model
    • the author of a model can then assign create/modify/delete permissions to other users, via a role, so that other users can create/modify/delete contents of that model without being author of the model itself
    • a permission declares one granted action on one module (there are no permissions for single contents of a model)
    • granted actions are:
      • modify mine
      • modify all
    • another example: a user creates the module news, then creates a role news administrator, and in that role puts one permission modify mine for the module news. doing so, a user that has role news administrator can add news contents to that module.
  • users

    • not authenticated users
      • view only public elements (structures and contents)
      • cannot modify anything
    • authenticated users
      • normal users (users who registered to the application)
        • a uses has one or more roles
        • view only public elements (structures and contents) from other users
        • can view/create/modify their elements (structures and contents) even if private, that is elements for which user is the author
          • additionally, if the user is author af a module, it can modify all contents for that modules, independently of content authorship)
      • super admin (the one user who installed application)
        • view all elements (structures and contents, public and private)
        • cannot create anything
        • can modify all elements (structures and contents, public and private, independently of element authorship)