如何在AppMaker中获取角色电子邮件地址 [英] How to get roles email address in AppMaker

查看:58
本文介绍了如何在AppMaker中获取角色电子邮件地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从AppMaker中的用户角色获取电子邮件地址?我知道app.user.role返回一个布尔值,无论电子邮件地址是否已分配给该角色.但是,我们如何获得角色电子邮件地址呢?

How to get the email address from user roles in AppMaker? I understand that app.user.role return a boolean whether the email address was assigned to that role or not. But how do we get the role email address then?

推荐答案

服务器API 具有app.getRoleMemebers(),这是您想要的:

Server API has app.getRoleMemebers() which is what you want:

var role = app.roles.Admins;
var members = app.getRoleMembers(role);

这篇关于如何在AppMaker中获取角色电子邮件地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆