Fix issues with authorizations
[lgpl/argeo-commons.git] / server / runtime / org.argeo.server.jcr / src / main / java / org / argeo / jcr / JcrUtils.java
index 7b99f0272235b558af7da25870ab02db14a849dc..4c0cbf39ddb351045b065402043ed9813ecd3bb0 100644 (file)
@@ -1546,7 +1546,7 @@ public class JcrUtils implements ArgeoJcrConstants {
 
        /**
         * Add privileges on a path to a {@link Principal}. The path must already
-        * exist.
+        * exist. Session is saved.
         */
        public static void addPrivileges(Session session, String path,
                        Principal principal, List<Privilege> privs)
@@ -1582,6 +1582,7 @@ public class JcrUtils implements ArgeoJcrConstants {
                        throw new ArgeoException("Don't know how to apply  privileges "
                                        + privs + " to " + principal + " on " + path);
                }
+               session.save();
        }
 
 }