@webx-ui/module-auth 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AdminDialog.d.ts +5 -1
- package/dist/AdminsPage.d.ts +49 -5
- package/dist/ConnectPage-CMJlMsmn.js +426 -0
- package/dist/ConnectPage-CMJlMsmn.js.map +1 -0
- package/dist/ConnectPage.d.ts +24 -1
- package/dist/KeyDialog.d.ts +28 -1
- package/dist/KeyList.d.ts +8 -2
- package/dist/ProfileDialog.d.ts +9 -5
- package/dist/RoleDialog.d.ts +21 -0
- package/dist/RoleList.d.ts +26 -0
- package/dist/admins.d.ts +9 -1
- package/dist/index-Bd6Dkuu8.js +3675 -0
- package/dist/index-Bd6Dkuu8.js.map +1 -0
- package/dist/index.d.ts +28 -3
- package/dist/index.js +29 -3226
- package/dist/index.js.map +1 -1
- package/dist/keys.d.ts +12 -2
- package/dist/module.d.ts +2 -2
- package/dist/session.d.ts +11 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +35 -0
- package/package.json +3 -3
package/dist/ProfileDialog.d.ts
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { Component } from 'vue';
|
|
2
2
|
/**
|
|
3
|
-
* Somebody editing themselves.
|
|
3
|
+
* Somebody editing themselves (WEBX_UI_PERMISSIONS.md §8).
|
|
4
4
|
*
|
|
5
5
|
* Not `AdminDialog` with the fields taken away. What a person may change about themselves and
|
|
6
6
|
* what an administrator may change about them are different lists, and the difference is the
|
|
7
|
-
* whole point: roles, super
|
|
8
|
-
*
|
|
7
|
+
* whole point: roles, super and active are not here, which is what makes this reachable by
|
|
8
|
+
* everybody rather than by whoever holds `admins.manage`.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
* the
|
|
10
|
+
* Four sections, each answering one question. The profile and the password are saved together
|
|
11
|
+
* by the button at the foot, as they always were. The interface takes effect as it is touched —
|
|
12
|
+
* the same switches as the corner menu, and a theme that waits for a button is a theme nobody
|
|
13
|
+
* can preview. The address is its own errand: a letter to the new one, and nothing changes
|
|
14
|
+
* until its link is followed — so it has its own button, and where the site sends no mail it
|
|
15
|
+
* says who changes the address instead.
|
|
12
16
|
*/
|
|
13
17
|
type __VLS_Props = {
|
|
14
18
|
/** The field to pick the photograph with — `WxMediaField` in a panel with the library. */
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Role } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* A role: its name, its code, and the permissions it opens, as a matrix — one row per module in
|
|
4
|
+
* the order of the menu, a box per permission, and a box on the row that ticks the whole module
|
|
5
|
+
* (WEBX_UI_PERMISSIONS.md §11).
|
|
6
|
+
*
|
|
7
|
+
* The server's rules are drawn here so they do not have to be learned from a refusal: a
|
|
8
|
+
* permission the editor does not hold is shown and cannot be ticked (rule 2), and a role the
|
|
9
|
+
* editor holds opens read-only (rule 5). They are only drawn — the server asks again.
|
|
10
|
+
*/
|
|
11
|
+
type __VLS_Props = {
|
|
12
|
+
/** Absent creates a role; present edits it. */
|
|
13
|
+
role?: Role | null;
|
|
14
|
+
/** Whoever may not edit roles reads them. */
|
|
15
|
+
readOnly?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
|
+
role: Role | null;
|
|
19
|
+
readOnly: boolean;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Role } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* The roles: what each is called, how much it opens and how many people hold it.
|
|
4
|
+
*
|
|
5
|
+
* Not paged and not searched. A site has a handful of roles, and the whole list is the thing a
|
|
6
|
+
* person compares when deciding which one to give somebody.
|
|
7
|
+
*/
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
/** Adds the menu that deletes a role — for whoever may edit roles. */
|
|
10
|
+
removable?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare function load(): Promise<void>;
|
|
13
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
14
|
+
reload: typeof load;
|
|
15
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
|
+
open: (role: Role) => any;
|
|
17
|
+
remove: (role: Role) => any;
|
|
18
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
+
onOpen?: ((role: Role) => any) | undefined;
|
|
20
|
+
onRemove?: ((role: Role) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
removable: boolean;
|
|
23
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
24
|
+
root: HTMLDivElement;
|
|
25
|
+
}, HTMLDivElement>;
|
|
26
|
+
export default _default;
|
package/dist/admins.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AdminContext } from '@webx-ui/module-admin';
|
|
2
|
-
import { Admin, AdminInput, AdminPage, AdminQuery, AgentCallPage, AgentCallQuery, Role } from './types';
|
|
2
|
+
import { Admin, AdminInput, AdminPage, AdminQuery, AgentCallPage, AgentCallQuery, PermissionRow, Role, RoleDetails, RoleInput } from './types';
|
|
3
3
|
export interface AdminsApi {
|
|
4
4
|
list(query?: AdminQuery): Promise<AdminPage>;
|
|
5
5
|
get(id: number): Promise<Admin>;
|
|
@@ -7,6 +7,14 @@ export interface AdminsApi {
|
|
|
7
7
|
update(id: number, input: AdminInput): Promise<Admin>;
|
|
8
8
|
remove(id: number): Promise<void>;
|
|
9
9
|
roles(): Promise<Role[]>;
|
|
10
|
+
/** One role with the people who hold it. */
|
|
11
|
+
role(id: number): Promise<RoleDetails>;
|
|
12
|
+
/** Every permission a role may list, by module. */
|
|
13
|
+
permissions(): Promise<PermissionRow[]>;
|
|
14
|
+
/** Behind `roles.manage`, like the two below. */
|
|
15
|
+
createRole(input: RoleInput): Promise<Role>;
|
|
16
|
+
updateRole(id: number, input: RoleInput): Promise<Role>;
|
|
17
|
+
removeRole(id: number): Promise<void>;
|
|
10
18
|
/** What agents did, newest first. Behind `admins.audit`. */
|
|
11
19
|
calls(query?: AgentCallQuery): Promise<AgentCallPage>;
|
|
12
20
|
}
|