提交 15efd273 编写于 作者: DCloud_JSON's avatar DCloud_JSON

更新uni-id-cf为:1.0.10版,修复 限制只有 admin 用户可管理用户标签(不支持非 admin 用户操作managerMultiTag 接口)

上级 d31f1067
## 1.1.27(2022-01-11)
更新uni-id-cf为:1.0.10版,修复 限制只有 admin 用户可管理用户标签(不支持非 admin 用户操作managerMultiTag 接口)
## 1.1.26(2021-12-29) ## 1.1.26(2021-12-29)
- 性能优化,list页面使用`getTemp`[详情](https://uniapp.dcloud.io/uniCloud/unicloud-db?id=collection) - 性能优化,list页面使用`getTemp`[详情](https://uniapp.dcloud.io/uniCloud/unicloud-db?id=collection)
- 拉齐uni-starter和uni-admin的schema新增:uni-id-tag.schema.json,更新:opendb-verify-codes.schema.json - 拉齐uni-starter和uni-admin的schema新增:uni-id-tag.schema.json,更新:opendb-verify-codes.schema.json
......
{ {
"id": "uni-starter", "id": "uni-starter",
"displayName": "uni-starter", "displayName": "uni-starter",
"version": "1.1.26", "version": "1.1.27",
"description": "云端一体应用快速开发基本项目模版", "description": "云端一体应用快速开发基本项目模版",
"keywords": [ "keywords": [
"login", "login",
......
## 1.0.10(2022-01-08)
- 修复 限制只有 admin 用户可管理用户标签(不支持非 admin 用户操作managerMultiTag 接口)
## 1.0.9(2021-12-01) ## 1.0.9(2021-12-01)
- 新增 uni-admin 用户标签管理接口 managerTags - 新增 uni-admin 用户标签管理接口 managerTags
## 1.0.8(2021-11-29) ## 1.0.8(2021-11-29)
......
{ {
"id": "uni-id-cf", "id": "uni-id-cf",
"displayName": "uni-id-cf", "displayName": "uni-id-cf",
"version": "1.0.9", "version": "1.0.10",
"description": "uni-id-cf", "description": "封装uni-id常用接口的云函数,快速实现简单、统一、可扩展的用户管理功能",
"keywords": [ "keywords": [
"uni-id-cf", "uni-id-cf",
"uni-id的云函数" "uni-id的云函数"
......
...@@ -297,7 +297,7 @@ exports.main = async (event, context) => { ...@@ -297,7 +297,7 @@ exports.main = async (event, context) => {
fileID fileID
} = await uniCloud.uploadFile({ } = await uniCloud.uploadFile({
cloudPath, cloudPath,
fileContent: getImgBuffer.data fileContent: getImgBuffer.data
}); });
headimgurlFile = { headimgurlFile = {
name: cloudPath, name: cloudPath,
...@@ -586,9 +586,24 @@ exports.main = async (event, context) => { ...@@ -586,9 +586,24 @@ exports.main = async (event, context) => {
...params ...params
}) })
break; break;
case 'managerMultiTag': case 'managerMultiTag': {
const {
userInfo
} = await uniID.getUserInfo({
uid: params.uid
})
// 限制只有 admin 角色的用户可管理标签,如需非 admin 角色需自行实现
if (userInfo.role.indexOf('admin') === -1) {
res = {
code: 403,
message: '非法访问, 无权限修改用户标签',
}
return
}
let { let {
ids, type, value ids,
type,
value
} = params } = params
if (type === 'add') { if (type === 'add') {
res = await db.collection('uni-id-users').where({ res = await db.collection('uni-id-users').where({
...@@ -612,7 +627,8 @@ exports.main = async (event, context) => { ...@@ -612,7 +627,8 @@ exports.main = async (event, context) => {
return return
} }
break; break;
// =========================== admin api end ========================= }
// =========================== admin api end =========================
default: default:
res = { res = {
code: 403, code: 403,
......
{ {
"name": "uni-id-cf", "name": "uni-id-cf",
"version": "1.0.0", "version": "1.0.0",
"description": "uni-id-cf是uni-id-uniCloudFunction的缩写", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
......
## 3.3.11(2022-01-11)
- 修复用户名密码登录时多个应用出现重复用户名登录报错的Bug
## 3.3.10(2022-01-07)
- 新增 自定义国际化语言支持 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=custom-i8n)
- 修复 一键登录时未校验重复手机号是否已验证的Bug
- 修复 Apple登录时用户邮箱为空时报错的Bug
- 修复 登录接口未传username时错误提示不正确的Bug
## 3.3.9(2021-11-09) ## 3.3.9(2021-11-09)
- 去除重复的context.xxx未找到的提示语 - 去除重复的context.xxx未找到的提示语
## 3.3.8(2021-10-28) ## 3.3.8(2021-10-28)
......
{ {
"id": "uni-id", "id": "uni-id",
"displayName": "uni-id", "displayName": "uni-id",
"version": "3.3.9", "version": "3.3.11",
"description": "简单、统一、可扩展的用户中心", "description": "简单、统一、可扩展的用户中心",
"keywords": [ "keywords": [
"uniid", "uniid",
......
{ {
"name": "uni-id", "name": "uni-id",
"version": "3.3.9", "version": "3.3.11",
"description": "uni-id for uniCloud", "description": "uni-id for uniCloud",
"main": "index.js", "main": "index.js",
"homepage": "https://uniapp.dcloud.io/uniCloud/uni-id", "homepage": "https://uniapp.dcloud.io/uniCloud/uni-id",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册