From 2eaff5665e3279476371e189b5718b903ff081f6 Mon Sep 17 00:00:00 2001 From: "Vahid V." Date: Tue, 26 Sep 2023 15:39:21 +0330 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=83=20docs:=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 ++ docs/classes/AccessControl.html | 18 +++++----- docs/classes/Grant.html | 34 +++++++++---------- docs/classes/MemoryDriver.html | 20 +++++------ docs/classes/Permission.html | 26 +++++++------- docs/coverage/lcov-report/index.html | 2 +- .../lcov-report/src/classes/acl.class.ts.html | 2 +- .../src/classes/grant.class.ts.html | 2 +- .../lcov-report/src/classes/index.html | 2 +- .../lcov-report/src/classes/index.ts.html | 2 +- .../src/classes/permission.class.ts.html | 2 +- .../lcov-report/src/consts/acl.const.ts.html | 2 +- .../lcov-report/src/consts/index.html | 2 +- .../lcov-report/src/consts/index.ts.html | 2 +- .../lcov-report/src/driver/index.html | 2 +- .../lcov-report/src/driver/index.ts.html | 2 +- .../lcov-report/src/driver/memory/index.html | 2 +- .../src/driver/memory/index.ts.html | 2 +- .../src/driver/memory/memory.driver.ts.html | 2 +- .../src/driver/memory/memory.tools.ts.html | 2 +- docs/coverage/lcov-report/src/index.html | 2 +- docs/coverage/lcov-report/src/index.ts.html | 2 +- .../lcov-report/src/types/cache.type.ts.html | 2 +- .../lcov-report/src/types/common.type.ts.html | 2 +- .../coverage/lcov-report/src/types/index.html | 2 +- .../lcov-report/src/types/index.ts.html | 2 +- .../src/types/pattern.type.ts.html | 2 +- .../lcov-report/src/types/policy.type.ts.html | 2 +- .../coverage/lcov-report/src/utils/index.html | 2 +- .../lcov-report/src/utils/index.ts.html | 2 +- .../lcov-report/src/utils/other.util.ts.html | 2 +- .../lcov-report/src/utils/regex.util.ts.html | 2 +- .../lcov-report/src/utils/strict.util.ts.html | 2 +- .../src/utils/validate.util.ts.html | 2 +- docs/coverage/lcov-report/test/index.html | 2 +- docs/coverage/lcov-report/test/mock.ts.html | 2 +- docs/functions/IP_CIDR.html | 2 +- docs/functions/accessibility.html | 2 +- docs/functions/accumulate.html | 2 +- docs/functions/filterByNotation.html | 2 +- docs/functions/isCIDR.html | 2 +- docs/functions/isCRON.html | 2 +- docs/functions/isIP.html | 2 +- docs/functions/isStrict.html | 2 +- docs/functions/key.html | 2 +- docs/functions/memoryIgnore.html | 2 +- docs/functions/parse.html | 2 +- docs/functions/pattern-1.html | 2 +- docs/functions/validate.html | 2 +- docs/index.html | 3 ++ docs/interfaces/AccessControlOptions.html | 6 ++-- docs/interfaces/CacheInterface.html | 12 +++---- docs/interfaces/CacheInterfaceOptions.html | 6 ++-- docs/interfaces/CanOptions.html | 6 ++-- docs/interfaces/ControlOptions.html | 4 +-- docs/interfaces/Pattern.html | 6 ++-- docs/interfaces/Policy.html | 16 ++++----- docs/interfaces/Time.html | 6 ++-- docs/interfaces/TimeOptions.html | 6 ++-- docs/types/CacheKey.html | 2 +- docs/types/MemoryDriverOptions.html | 2 +- docs/types/PropType.html | 2 +- docs/types/PropValue.html | 2 +- docs/variables/ALL.html | 2 +- docs/variables/ANY.html | 2 +- .../variables/DefaultMemoryDriverOptions.html | 2 +- docs/variables/NULL.html | 2 +- docs/variables/OK.html | 2 +- docs/variables/POLICY_NOTATION.html | 2 +- docs/variables/SEP.html | 2 +- docs/variables/STRICT.html | 2 +- docs/variables/cidrRegex.html | 2 +- docs/variables/ipRegex.html | 2 +- 73 files changed, 146 insertions(+), 141 deletions(-) diff --git a/README.md b/README.md index 2db0792..e5bd4ac 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,8 @@ const article = { Create a new access control object, then get the permission grants: +> _Note_: you can have more control over restricted properties by sending the first character of the `subject`, `action`, and `object` as string like `so` it means `subject` and `object` are in strict mode and `action` not. + ```ts import AccessControl from 'abacl'; diff --git a/docs/classes/AccessControl.html b/docs/classes/AccessControl.html index 23c05ae..68f1cfa 100644 --- a/docs/classes/AccessControl.html +++ b/docs/classes/AccessControl.html @@ -29,7 +29,7 @@

Hierarchy

+
  • Defined in classes/acl.class.ts:17
  • @@ -77,19 +77,19 @@
    Optional Optional options: AccessControlOptions<Sub, Act, Obj>

    Returns AccessControl<Sub, Act, Obj>

    +
  • Defined in classes/acl.class.ts:21
  • Properties

    driver: CacheInterface<Sub, Act, Obj>
    +
  • Defined in classes/acl.class.ts:18
  • options: ControlOptions = {}
    +
  • Defined in classes/acl.class.ts:19
  • Methods

    @@ -110,7 +110,7 @@
    object: Optional options: CanOptions<Sub, Act, Obj>

    Returns Promise<Permission<Sub, Act, Obj>>

    +
  • Defined in classes/acl.class.ts:53
  • +
  • Defined in classes/acl.class.ts:33
  • Returns Promise<"OK">

    +
  • Defined in classes/acl.class.ts:41
  • Returns Promise<boolean>

    +
  • Defined in classes/acl.class.ts:37
  • Returns Promise<"OK">

    +
  • Defined in classes/acl.class.ts:45
  • Returns void

    +
  • Defined in classes/grant.class.ts:30
  • Methods

    @@ -134,7 +134,7 @@

    Parameters

    policy: Policy<Sub, Act, Obj>

    Returns boolean

    +
  • Defined in classes/grant.class.ts:52
  • Returns boolean

    +
  • Defined in classes/grant.class.ts:48
  • Returns Promise<Data>

    +
  • Defined in classes/grant.class.ts:148
  • Returns Promise<Data>

    +
  • Defined in classes/grant.class.ts:167
  • Returns boolean

    +
  • Defined in classes/grant.class.ts:56
  • Returns boolean

    +
  • Defined in classes/grant.class.ts:119
  • Returns Promise<string[][]>

    +
  • Defined in classes/grant.class.ts:186
  • Returns Scope[]

    +
  • Defined in classes/grant.class.ts:65
  • Returns Sub[]

    +
  • Defined in classes/grant.class.ts:83
  • Returns boolean

    +
  • Defined in classes/grant.class.ts:97
  • Returns void

    +
  • Defined in classes/grant.class.ts:40
  • Returns MemoryDriver<Sub, Act, Obj>

    +
  • Defined in driver/memory/memory.driver.ts:45
  • Returns Promise<Data>

    +
  • Defined in classes/permission.class.ts:38
    • @@ -160,7 +160,7 @@
      data: Optional cKey: CacheKey<T, M, S> | (<Data>(data) => CacheKey<T, M, S> | Promise<CacheKey<T, M, S>>)

    Returns Promise<Data>

    +
  • Defined in classes/permission.class.ts:45
  • Returns boolean

    +
  • Defined in classes/permission.class.ts:18
  • Returns boolean

    +
  • Defined in classes/permission.class.ts:34
  • Returns Scope[]

    +
  • Defined in classes/permission.class.ts:22
  • Returns Sub[]

    +
  • Defined in classes/permission.class.ts:26
  • Returns boolean

    +
  • Defined in classes/permission.class.ts:30
  • Returns Permission<Sub, Act, Obj>

    +
  • Defined in classes/permission.class.ts:52