Skip to content

Commit

Permalink
fix: unused first permission.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjholm committed Jan 30, 2024
1 parent 94707b6 commit 94614e2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/resources/bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export class BucketResource extends SecureResource<BucketPermission> {
* @returns a usable bucket reference
*/
public for(perm: BucketPermission, ...perms: BucketPermission[]): Bucket {
this.registerPolicy(...perms);
this.registerPolicy(perm, ...perms);

return storage().bucket(this.name);
}
Expand Down
2 changes: 1 addition & 1 deletion src/resources/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class CollectionResource<
* @returns a usable collection reference
*/
public for(perm: CollectionPermission, ...perms: CollectionPermission[]) {
this.registerPolicy(...perms);
this.registerPolicy(perm, ...perms);

return documents().collection<T>(this.name);
}
Expand Down
2 changes: 1 addition & 1 deletion src/resources/queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class QueueResource<
* @returns a useable queue.
*/
public for(perm: QueuePermission, ...perms: QueuePermission[]): Queue<T> {
this.registerPolicy(...perms);
this.registerPolicy(perm, ...perms);

return queues().queue(this.name);
}
Expand Down
2 changes: 1 addition & 1 deletion src/resources/secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class SecretResource extends SecureResource<SecretPermission> {
}

public for(perm: SecretPermission, ...perms: SecretPermission[]): Secret {
this.registerPolicy(...perms);
this.registerPolicy(perm, ...perms);

return secrets().secret(this.name);
}
Expand Down
2 changes: 1 addition & 1 deletion src/resources/topic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export class TopicResource<
* @returns a usable topic reference
*/
public for(perm: TopicPermission, ...perms: TopicPermission[]): Topic<T> {
this.registerPolicy(...perms);
this.registerPolicy(perm, ...perms);
return events().topic(this.name);
}
}
Expand Down

0 comments on commit 94614e2

Please sign in to comment.