使用 BigInt 进行权限管理

This commit is contained in:
undefined committed 2020-07-14 22:03:54 +08:00
1 parent eaed0e84f5
commit 8aef05a375
17 files changed
+252 -197

No files matched your search

+6 -2
View File
@@ -172,9 +172,13 @@ class UserDetailHandler extends Handler {
sdoc.updateIp = '';
sdoc._id = '';
}
const path = [
['Hydro', 'homepage'],
['user_detail', 'user_detail', { uid }],
];
this.response.template = 'user_detail.html';
this.response.body = {
isSelfProfile, udoc, sdoc, rdocs, pdict,
isSelfProfile, udoc, sdoc, rdocs, pdict, path,
};
}
}
@@ -321,7 +325,7 @@ class OauthCallbackHandler extends Handler {
r.uname.push(String.random(16));
for (const uname of r.uname) {
// eslint-disable-next-line no-await-in-loop
const nudoc = await user.getByUname('system', uname, true);
const nudoc = await user.getByUname('system', uname);
if (!nudoc) {
username = uname;
break;