Documentation


SEARCH

TABLE OF CONTENT

    1. Getting started 2. Basic concepts 3. Request dispatching 4. Context container 5. Dual MVC 6. Component model: 7. Security 8. Configuration 9. Session handling 10. I18n 11. Cache 12. Logging 13. Error handling 14. Advanced Topics 15. API reference

      Tutorials: Frequently Asqued Questions

      See also:


      Class: __ProtectedSectionComponent


      Class Overview

      A protected section encloses a content that will be shown only to users having a given permission.

      Protected section tag is protectedsection

      i.e.

      1.    <comp:protectedsection permission="ADMIN_PERMISSION">
      2.  
      3.      content protected here
      4.  
      5.    </comp:protectedsection>

      To define the permission to be checked, a protected section has the permission attribute, being the permission identifier that the user in session must have to see the enclosed content

      Users without the permission won't see the content enclosed by a protected section, but it won't raise any permission exception, nor a security error.


      Author:  Antonio Parraga Navarro
      Version:  1.4
      Copyright:  Copyright (c) 2010 Antonio Parraga Navarro
      __UIComponent
         |
         --__UIContainer
            |
            --__ProtectedSectionComponent

      Properties

      Methods

      [ Top ]

      Inherited Properties, Constants, and Methods

      Inherited Properties Inherited Methods Inherited Constants

      Inherited From __UIContainer

      Inherited From __UIComponent

      Inherited From __UIContainer

      Inherited From __UIComponent


      [ Top ]

      Constant Summary


      [ Top ]

      Properties Summary

      mixed   $_condition  
      mixed   $_permission_id  

      [ Top ]

      Method Summary

      void   getCondition()  
      string   getPermission()   Get an string identifying the permission in which the section is protected to
      void   setIfNotPermission()  
      void   setIfPermission()  
      void   setNotPermission()  
      void   setPermission()   Set an string identifying the permission to protect the section with

      [ Top ]

      Properties

      mixed   $_condition = self::IF_HAS_PERMISSION
      Access:  protected


      mixed   $_permission_id = null
      Access:  protected


      Methods

      getCondition


        void getCondition( )

      Access:  public



      getPermission


        string getPermission( )

      Get an string identifying the permission in which the section is protected to

      Access:  public



      setIfNotPermission


        void setIfNotPermission( $permission_id  )


      Parameters:
      TypeNameDescription
      $permission_id

      Access:  public



      setIfPermission


        void setIfPermission( $permission_id  )


      Parameters:
      TypeNameDescription
      $permission_id

      Access:  public



      setNotPermission


        void setNotPermission( $permission_id  )


      Parameters:
      TypeNameDescription
      $permission_id

      Access:  public



      setPermission


        void setPermission( string $permission_id  )

      Set an string identifying the permission to protect the section with


      Parameters:
      TypeNameDescription
      string $permission_id

      Access:  public



      Constants

      IF_HAS_PERMISSION =  1


      [ Top ]

      IF_NOT_HAS_PERMISSION =  2


      [ Top ]