HowTos User Management

Aus Salespoint

Dies ist eine alte Version. Zeitpunkt der Bearbeitung: 22:30, 5. Apr. 2009 durch Freekmastah (Diskussion | Beiträge).
Wechseln zu: Navigation, Suche

Use the UserManager

Description: The UserManager is an administration tool with a huge functionality. First of all you can store Users in it with all necessary information, even their own passwords, which you can garble (make unreadable). By assigning them certain Capabilities you can protect any possible Action of your application from unauthorized access and thereby have customers and employees administered by one UserManager.

ToDo:

  1. Make an instance of UserManager in your Shop class.
  2. Set the instance as global UserManager.
  3. If you want to add an User, get the GlobalUM and add the User to it.

Example Source Code:

public class UserShop extends Shop
{
public UserShop()
{
super();
1
UserManager userManager = new UserManager();
 
2
UserManager.setGlobalUM(userManager);
}
 
public void init()
{
3
User user = new User("Dolores");
UserManager.getGlobalUM().addUser(user);
}
}

Add an ActionCapability to an User

Garble a User's password

Persönliche Werkzeuge