I'm trying to create an interface where users can add new group, while admin can delete and update existing groups. I found this, but do not know how exactly to implement it.(Might need some ideas)
And where does the groups information been stored in mongodb? Been trying querying the value for groups in order to know existing GroupName but I could not get any results.
Telescope.schemas.userData = new SimpleSchema({
...
groups: {
type: [String],
optional: true,
control: "checkboxgroup",
insertableIf: canEditAll,
editableIf: canEditAll,
form: {
options: function () {
const groups = _.without(_.keys(Users.groups), "anonymous", "default", "admins");
return groups.map(group => {return {value: group, label: group};});
}
},
},
});
....
and
API :
Users.createGroup(GroupName)
Groups are not stored in Mongo, you have to define them in your code. So at this time there's no way for users to create new groups from a web UI, sorry.