@fangcha/user-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.21.0 • Public • Published

user-sdk

Installation

# Use npm
npm install @fangcha/user-sdk

# Or use yarn
yarn add @fangcha/user-sdk

Usage

// Init a global checker
const checker = AdminUserCenter.useAutoReloadingChecker(new UserProxy(……))

// checkUserHasPermission: boolean
checker.checkUserHasPermission(userKey, permissionKey)

// getPermissionKeysForUser: string[]
checker.getPermissionKeysForUser(userKey)
// Wait until the initial data is ready
await AdminUserCenter.waitForReady()

Readme

Keywords

Package Sidebar

Install

npm i @fangcha/user-sdk

Weekly Downloads

4

Version

0.21.0

License

MIT

Unpacked Size

69.6 kB

Total Files

50

Last publish

Collaborators

  • fangqk1991