generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renamed isTenant() to isActiveTenant() to better support intent (#655)
- Loading branch information
1 parent
1243618
commit fb71bfa
Showing
7 changed files
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
/** | ||
* An interface that determines if a DID is a tenant of the DWN. | ||
* An interface that gates tenant access to the DWN. | ||
*/ | ||
export interface TenantGate { | ||
/** | ||
* @returns `true` if the given DID is a tenant of the DWN; `false` otherwise | ||
* @returns `true` if the given DID is an active tenant of the DWN; `false` otherwise | ||
*/ | ||
isTenant(did: string): Promise<boolean>; | ||
isActiveTenant(did: string): Promise<boolean>; | ||
} | ||
|
||
/** | ||
* A tenant gate that treats every DID as a tenant. | ||
* A tenant gate that treats every DID as an active tenant. | ||
*/ | ||
export class AllowAllTenantGate implements TenantGate { | ||
public async isTenant(_did: string): Promise<boolean> { | ||
public async isActiveTenant(_did: string): Promise<boolean> { | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters