Administrating groups in JMP Live presents a different challenge, as groups have their own subsets of users and administrators. A system admin is a group admin, but a group admin does not necessarily have to be a system admin. As a system admin, you are not immediately added to every group contained within the server. However, you can still view and administrate a group you are not a part of.
The following steps show how to view a group that you are not a part of, as well as how to access all the group’s settings:
A group admin can access the same settings using the same steps as above, but replacing Steps 1 and 2 with the following:
There are three ways to assign a group admin:
A system/group admin can also script administrative actions using JMP Live’s REST API in conjunction with JMP Live’s HTTP Request() function.
The attached script (JMP Live Login.jsl) is used to log in the admin. This process requires four pieces of information:
Once logged in, the code below provides examples of administrative actions that can be scripted:
// --------------------------------------------------
// Get a list of all the groups and generate a table with all the groups
// --------------------------------------------------
request << reset( Url( webJMPUrl || "/api/groups/?all_groups=true" ), Method( "GET" ), Insecure );
data = request << Send;
dt2 = JSON To Data Table( data );
// --------------------------------------------------
// Add a member to a group with the following permissions:
// “allow_publish” – can this user publish to this group?
// “allow_delete” – can user delete content published by other members?
// “allow_admin” – can user add, delete and change permissions of group members?
// --------------------------------------------------
request << reset(
Url( webJMPUrl || "/api/groups/" || Char( Group ID number ) || "/members" ),
Method( "POST" ),
Form( Fields( ["uid" => user’s id number, "allow_publish" => 1, "allow_delete" => 1, "allow_admin" => 1] ) ),
Insecure
);
data = request << Send;
// --------------------------------------------------
// Change permissions
// --------------------------------------------------
request << reset(
Url( webJMPUrl || "/api/groups/" || Char( Group ID Number ) || "/members/" || Char( User ID Number ) ),
Method( "PATCH" ),
Form( Fields( ["allow_publish" => 1, "allow_delete" => 0, "allow_admin" => 0] ) ),
Insecure
);
data = request << Send;
// --------------------------------------------------
// Delete a member from a group
// --------------------------------------------------
request << reset(
Url( webJMPUrl || "/api/groups/" || Char( Group ID Number ) || "/members/" || Char( User ID Number ) ),
Method( "Delete" ), Insecure
);
data = request << Send;
Editor's note: Have you read the other installments in our JMP Live admin tricks series?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.