Skip to content

Commit

Permalink
Document clearly that @can uses primary keys in find (nuwave#1437)
Browse files Browse the repository at this point in the history
  • Loading branch information
spawnia committed Jun 17, 2020
1 parent 50a6b71 commit e801898
Show file tree
Hide file tree
Showing 17 changed files with 47 additions and 37 deletions.
4 changes: 2 additions & 2 deletions docs/4.0/api-reference/directives.md
Expand Up @@ -447,8 +447,8 @@ directive @can(
ability: String!

"""
The name of the argument that is used to find a specific model
instance against which the permissions should be checked.
If your policy checks against specific model instances, specify
the name of the field argument that contains its primary key(s).
"""
find: String

Expand Down
4 changes: 2 additions & 2 deletions docs/4.1/api-reference/directives.md
Expand Up @@ -451,8 +451,8 @@ directive @can(
ability: String!

"""
The name of the argument that is used to find a specific model
instance against which the permissions should be checked.
If your policy checks against specific model instances, specify
the name of the field argument that contains its primary key(s).
"""
find: String

Expand Down
6 changes: 4 additions & 2 deletions docs/4.10/api-reference/directives.md
Expand Up @@ -444,8 +444,10 @@ directive @can(
ability: String!

"""
The name of the argument that is used to find a specific model
instance against which the permissions should be checked.
If your policy checks against specific model instances, specify
the name of the field argument that contains its primary key(s).
You may pass the string in dot notation to use nested inputs.
"""
find: String

Expand Down
6 changes: 4 additions & 2 deletions docs/4.11/api-reference/directives.md
Expand Up @@ -444,8 +444,10 @@ directive @can(
ability: String!

"""
The name of the argument that is used to find a specific model
instance against which the permissions should be checked.
If your policy checks against specific model instances, specify
the name of the field argument that contains its primary key(s).
You may pass the string in dot notation to use nested inputs.
"""
find: String

Expand Down
6 changes: 4 additions & 2 deletions docs/4.12/api-reference/directives.md
Expand Up @@ -444,8 +444,10 @@ directive @can(
ability: String!

"""
The name of the argument that is used to find a specific model
instance against which the permissions should be checked.
If your policy checks against specific model instances, specify
the name of the field argument that contains its primary key(s).
You may pass the string in dot notation to use nested inputs.
"""
find: String

Expand Down
6 changes: 4 additions & 2 deletions docs/4.13/api-reference/directives.md
Expand Up @@ -445,8 +445,10 @@ directive @can(
ability: String!

"""
The name of the argument that is used to find a specific model
instance against which the permissions should be checked.
If your policy checks against specific model instances, specify
the name of the field argument that contains its primary key(s).
You may pass the string in dot notation to use nested inputs.
"""
find: String

Expand Down
6 changes: 4 additions & 2 deletions docs/4.14/api-reference/directives.md
Expand Up @@ -445,8 +445,10 @@ directive @can(
ability: String!

"""
The name of the argument that is used to find a specific model
instance against which the permissions should be checked.
If your policy checks against specific model instances, specify
the name of the field argument that contains its primary key(s).
You may pass the string in dot notation to use nested inputs.
"""
find: String

Expand Down
4 changes: 2 additions & 2 deletions docs/4.2/api-reference/directives.md
Expand Up @@ -467,8 +467,8 @@ directive @can(
ability: String!

"""
The name of the argument that is used to find a specific model
instance against which the permissions should be checked.
If your policy checks against specific model instances, specify
the name of the field argument that contains its primary key(s).
"""
find: String

Expand Down
4 changes: 2 additions & 2 deletions docs/4.3/api-reference/directives.md
Expand Up @@ -467,8 +467,8 @@ directive @can(
ability: String!

"""
The name of the argument that is used to find a specific model
instance against which the permissions should be checked.
If your policy checks against specific model instances, specify
the name of the field argument that contains its primary key(s).
"""
find: String

Expand Down
4 changes: 2 additions & 2 deletions docs/4.4/api-reference/directives.md
Expand Up @@ -467,8 +467,8 @@ directive @can(
ability: String!

"""
The name of the argument that is used to find a specific model
instance against which the permissions should be checked.
If your policy checks against specific model instances, specify
the name of the field argument that contains its primary key(s).
"""
find: String

Expand Down
4 changes: 2 additions & 2 deletions docs/4.5/api-reference/directives.md
Expand Up @@ -467,8 +467,8 @@ directive @can(
ability: String!

"""
The name of the argument that is used to find a specific model
instance against which the permissions should be checked.
If your policy checks against specific model instances, specify
the name of the field argument that contains its primary key(s).
"""
find: String

Expand Down
4 changes: 2 additions & 2 deletions docs/4.6/api-reference/directives.md
Expand Up @@ -467,8 +467,8 @@ directive @can(
ability: String!

"""
The name of the argument that is used to find a specific model
instance against which the permissions should be checked.
If your policy checks against specific model instances, specify
the name of the field argument that contains its primary key(s).
"""
find: String

Expand Down
4 changes: 2 additions & 2 deletions docs/4.7/api-reference/directives.md
Expand Up @@ -470,8 +470,8 @@ directive @can(
ability: String!

"""
The name of the argument that is used to find a specific model
instance against which the permissions should be checked.
If your policy checks against specific model instances, specify
the name of the field argument that contains its primary key(s).
"""
find: String

Expand Down
4 changes: 2 additions & 2 deletions docs/4.8/api-reference/directives.md
Expand Up @@ -470,8 +470,8 @@ directive @can(
ability: String!

"""
The name of the argument that is used to find a specific model
instance against which the permissions should be checked.
If your policy checks against specific model instances, specify
the name of the field argument that contains its primary key(s).
"""
find: String

Expand Down
6 changes: 2 additions & 4 deletions docs/4.9/api-reference/directives.md
Expand Up @@ -450,10 +450,8 @@ directive @can(
ability: String!

"""
The name of the argument that is used to find a specific model
instance against which the permissions should be checked.
You may pass the string as a dot notation to search in a array.
If your policy checks against specific model instances, specify
the name of the field argument that contains its primary key(s).
"""
find: String

Expand Down
6 changes: 4 additions & 2 deletions docs/master/api-reference/directives.md
Expand Up @@ -445,8 +445,10 @@ directive @can(
ability: String!

"""
The name of the argument that is used to find a specific model
instance against which the permissions should be checked.
If your policy checks against specific model instances, specify
the name of the field argument that contains its primary key(s).
You may pass the string in dot notation to use nested inputs.
"""
find: String

Expand Down
6 changes: 3 additions & 3 deletions src/Schema/Directives/CanDirective.php
Expand Up @@ -48,10 +48,10 @@ public static function definition(): string
ability: String!
"""
The name of the argument that is used to find a specific model
instance against which the permissions should be checked.
If your policy checks against specific model instances, specify
the name of the field argument that contains its primary key(s).
You may pass the string as a dot notation to search in a array.
You may pass the string in dot notation to use nested inputs.
"""
find: String
Expand Down

0 comments on commit e801898

Please sign in to comment.