Geostore.Users class - geosolutions-it/MapStore GitHub Wiki
Class: Geostore.Users
Location: MSMUtil.js
Requires: Ext JS 3.4
CRUD methods for users in GeoStore.
Usage Examples
Init
users = new GeoStore.Users(
{ authorization: /* GeoStore auth token, typically 'Basic base64(admin:admin) */,
url: /* where User services are located, typically http://host:port/geostore/rest/users*/,
}).failure( function(response){
/* CALLBACK METHOD WHEN STH WENT WRONG */
});
Delete user
users.delete( /* USER ID */,
function(data){ // callback method on success
/* DO SOMETHING */
} );
Create user
users.create(
{name: 'marco',
password:'verysecret',
role:'USER' },
function(response){ // callback
/* DO SOMETHING */
});