hibernate/src/java/org/apache/fulcrum/security/hibernate/turbine/HibernateModelManagerImpl.java [159:177]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void grant(User user, Group group, Role role) throws DataBackendException, UnknownEntityException
    {
        boolean roleExists = false;
        boolean userExists = false;
        boolean groupExists = false;
        try
        {
            roleExists = getRoleManager().checkExists(role);
            userExists = getUserManager().checkExists(user);
            groupExists = getGroupManager().checkExists(group);
            if (roleExists && groupExists && userExists)
            {
                TurbineUserGroupRole ugr = new TurbineUserGroupRole();
                ugr.setGroup(group);
                ugr.setRole(role);
                ugr.setUser(user);
                ((TurbineUser) user).addUserGroupRole(ugr);
                ((TurbineGroup) group).addUserGroupRole(ugr);
                ((TurbineRole) role).addUserGroupRole(ugr);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



memory/src/java/org/apache/fulcrum/security/memory/turbine/MemoryTurbineModelManagerImpl.java [129:147]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void grant(User user, Group group, Role role) throws DataBackendException, UnknownEntityException
    {
        boolean roleExists = false;
        boolean userExists = false;
        boolean groupExists = false;
        try
        {
            roleExists = getRoleManager().checkExists(role);
            userExists = getUserManager().checkExists(user);
            groupExists = getGroupManager().checkExists(group);
            if (roleExists && groupExists && userExists)
            {
                TurbineUserGroupRole ugr = new TurbineUserGroupRole();
                ugr.setGroup(group);
                ugr.setRole(role);
                ugr.setUser(user);
                ((TurbineUser) user).addUserGroupRole(ugr);
                ((TurbineGroup) group).addUserGroupRole(ugr);
                ((TurbineRole) role).addUserGroupRole(ugr);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



