3 Replies Latest reply on Dec 30, 2007 6:28 AM by meaobao

    Added Permisson Problem

       

      Dear All,

       

       

      I need help please, i added a new permission to the clearspace permission matrix & it's successfully added & everything is Ok, the problem is i want to know how to refer to this permission in the ui-components.xml ??

       

       

      For example there's a permission called CREATE_THREAD and clearspace refer to it in the ui-components as canCreateThread ..... so how can i refer to my new permission with the same way ??

       

       

      my new added permission called CREATE_GROUP and i tried canCreateGroup but nothing happned , i guess there's something missing, any idea please & thanks in advance.

       

       

        • Re: Added Permisson Problem

          hi Mohamed,

           

          In ui-components.xml, when we refer to canCreateThread we're actually referring to the method in CommunityActionSupport getCanCreateThread() which itself then refers to the permission. You can / could write a method like this:

          public boolean getCanCreateGroup() {
            return getUser().getPermissions(getAuthToken()).hasPermission(YourClass.CREATE_GROUP);
          }

          where YourClass.CREATE_GROUP is the class that contains the permission you created.

           

          Cheers,

           

          AJ

            • Re: Added Permisson Problem

               

              Thankls AJ , i will try this & reply back with the results

               

               

              M.H.

               

               

              • Re: Added Permisson Problem

                 

                I tried your solution but it doesn't work for both clearspace predefined permissions & my new added permissions but take a look at thos code : getJiveConetxt().isAuthorized(Permissions.permissionType); this works fine with clearspace predefined permissions but it doesn't with my new added permissions  :_| , it always returns false even if i set it true from the admin console permission matrix, what should i do so the system see the permission right , down is my steps to create a new permissions & please update me if i forgot something effective.

                 

                 

                1)updating perms.jsp

                 

                 

                2)perm-methods.jspf

                 

                 

                3)Permissions.java

                 

                 

                Please help as i am in a very cretical section the project & thanks in advance.

                 

                 

                M.H.