MentDB, The digital brain.  About me Home
Back / All functions / Group

A user or script can belong to groups.
A group has rights.

group add group create|insert|addgroup existgroup grant usergroup grant scriptgroup is granted usergroup is granted scriptgroup getgroup get usergroup get scriptgroup showgroup ungrant usergroup ungrant scriptgroup remove

group add <groupName>

Synonymous

    group create|insert|add

Description

    To add a new group

Parameters

    groupName:   The group name - string - required
admin
group add "test"
mentdb
Group added with successful.

group exist <groupName>

Description

    To check if a group exist

Parameters

    groupName:   The group name - string - required
admin
group exist "test"
mentdb
1

group grant user <login> <groupName>

Description

    To grant a user to a group

Parameters

    login:   The login - string - required
    groupName:   The group name - string - required
admin
group grant user "admin" "test"
mentdb
User granted with successful.

group grant script <scriptName> <groupName>

Description

    To grant a script to a group

Parameters

    scriptName:   The script name - string - required
    groupName:   The group name - string - required
admin
script create "substraction" "[v1],[v2]" {

- [v1] [v2];

};
group grant script "substraction" "test"
mentdb
Script granted with successful.

group is granted user <login> <groupName>

Description

    To check if a user granted to a group

Parameters

    login:   The login - string - required
    groupName:   The group name - string - required
admin
group is granted user "admin" "test"
mentdb
1

group is granted script <scriptName> <groupName>

Description

    To check if a script granted to a group

Parameters

    scriptName:   The script name - string - required
    groupName:   The group name - string - required
admin
group is granted script "substraction" "test"
mentdb
1

group get <groupName>

Description

    To get the group

Parameters

    groupName:   The group name - string - required
admin
group get "test"
mentdb
{
"k": "test",
"scripts": [
"substraction"
],
"users": [
"admin"
]
}

group get user <groupName>

Description

    To get users from a group

Parameters

    groupName:   The group name - string - required
admin
group get user "test"
mentdb
[
"admin"
]

group get script <groupName>

Description

    To get scripts from a group

Parameters

    groupName:   The group name - string - required
admin
group get script "test"
mentdb
[
"substraction"
]

group show

Description

    To show all groups

admin
group show
mentdb
{
"all": "G[all]",
"luc-yann": "G[luc-yann]",
"process": "G[process]",
"test": "G[test]",
"luc-yann2": "G[luc-yann2]",
"reader": "G[reader]",
"ai": "G[ai]",
"admin": "G[admin]",
"brain": "G[brain]",
"api-mql": "G[api-mql]",
"api-rest": "G[api-rest]",
"system": "G[system]",
"library": "G[library]",
"bob2": "G[bob2]",
"bob": "G[bob]",
"action": "G[action]",
"api-ai": "G[api-ai]",
"perf": "G[perf]",
"mentdb": "G[mentdb]"
}

group ungrant user <login> <groupName>

Description

    To ungrant a user to a group

Parameters

    login:   The login - string - required
    groupName:   The group name - string - required
admin
group ungrant user "admin" "test"
mentdb
User ungranted with successful.

group ungrant script <scriptName> <groupName>

Description

    To ungrant a script to a group

Parameters

    scriptName:   The script name - string - required
    groupName:   The group name - string - required
admin
group ungrant script "substraction" "test"
mentdb
Script ungranted with successful.

group remove <groupName>

Description

    To remove a group

Parameters

    groupName:   The group name - string - required
admin
group remove "test"
mentdb
Group removed with successful.




© 2012-2017 - Jimmitry Payet.