0 Replies Latest reply on Jan 9, 2015 4:55 AM by Poornima Abhilash

    How can we update site permission through gatein api?

    Poornima Abhilash Newbie

      I tried to give access permission to one group for my portal through gatein API. I used the below code and  gave the permission .But when i tried to give permission to one more group to that portal , the previous permission overwrite with the new permission(i mean the previously added group lost its access permission). Same issue there with Gatein Pages.

       

      Below is the code i used  for giving permission

       

      Portal portal = PortalRequest.getInstance().

      getPortal();
              Site site = portal.getSite(new SiteId("siteName"));
              site.setAccessPermission(Permission.any("GroupName"));
              site.setEditPermission(Permission.any("GroupName"));
              portal.saveSite(site);
             
      Please help me for updating the access permission.

       

      Thanks in advance