HowTos User Management

Aus Salespoint

(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „===Use the UserManager=== ===Add an ActionCapability to an User=== ===Garble a User's password===“)
(Use the UserManager)
Zeile 1: Zeile 1:
-
===Use the UserManager===  
+
===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:'''
 +
 
 +
# Make an instance of UserManager in your Shop class.
 +
# Set the instance as global UserManager.
 +
# If you want to add an User, get the GlobalUM and add the User to it.
 +
 
 +
'''Example Source Code:'''
 +
<code java>
 +
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);
 +
    }
 +
}
 +
</code>
 +
 
===Add an ActionCapability to an User===  
===Add an ActionCapability to an User===  
===Garble a User's password===
===Garble a User's password===

Version vom 22:30, 5. Apr. 2009

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