Merge tag '13.6.0' into io

This commit is contained in:
Cookie Ramen
2023-02-13 21:57:14 +09:00
62 changed files with 545 additions and 1846 deletions

View File

@@ -203,6 +203,20 @@ export function getUserMenu(user, router: Router = mainRouter) {
action: () => {
router.push('/user-info/' + user.id + '#moderation');
},
}, {
icon: 'ti ti-badges',
text: i18n.ts.roles,
action: async () => {
const roles = await os.api('admin/roles/list');
const { canceled, result: roleId } = await os.select({
title: i18n.ts._role.chooseRoleToAssign,
items: roles.map(r => ({ text: r.name, value: r.id })),
});
if (canceled) return;
await os.apiWithDialog('admin/roles/assign', { roleId, userId: user.id });
},
}]);
}
}