From dc2442976bdf1592ac73a2d54e56a296aff21b6a Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Mon, 12 Jan 2015 04:16:42 +0100 Subject: [PATCH] Update README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index df30293..b540e01 100644 --- a/README.md +++ b/README.md @@ -92,3 +92,5 @@ user.permissions = permissions.getValue(); user.originalPermissions = permissions.getOriginalValue(); user.save(); // Done! The inheritance structure will persist, even through database loads and saves. ``` + +In this example, `getValue()` will return the effective value (ie. all flags that are set), while `getOriginalValue()` will only return a value consisting of the *explicitly* set flags. This second value is what is used to keep track of inherited permissions, and should be passed as a second argument to `.create` when creating a new value.