Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Geostore.Users class

mstn edited this page Jul 14, 2012 · 2 revisions

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 */	
});
Clone this wiki locally