|
|
|
@ -6,6 +6,7 @@ import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import cokr.xit.base.security.AccessContext;
|
|
|
|
|
import cokr.xit.base.security.access.ActionGroup;
|
|
|
|
|
import cokr.xit.base.security.access.dao.AuthorityMapper;
|
|
|
|
|
import cokr.xit.base.security.access.service.ActionGroupService;
|
|
|
|
@ -22,6 +23,8 @@ public class ActionGroupServiceBean extends AbstractServiceBean implements Actio
|
|
|
|
|
private ActionGroupBean actionGroupBean;
|
|
|
|
|
@Resource(name="authorityMapper")
|
|
|
|
|
private AuthorityMapper authorityMapper;
|
|
|
|
|
@Resource(name="accessContext")
|
|
|
|
|
private AccessContext accessContext;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<DataObject> getGroupList(ActionQuery req) {
|
|
|
|
@ -53,7 +56,7 @@ public class ActionGroupServiceBean extends AbstractServiceBean implements Actio
|
|
|
|
|
@Override
|
|
|
|
|
public int remove(String... groupIDs) {
|
|
|
|
|
authorityMapper.removeActionGroups(groupIDs);
|
|
|
|
|
return actionGroupBean.remove(groupIDs);
|
|
|
|
|
return accessContext.loadAuthorities(actionGroupBean.remove(groupIDs));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -63,11 +66,11 @@ public class ActionGroupServiceBean extends AbstractServiceBean implements Actio
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int addActions(String groupID, String... actions) {
|
|
|
|
|
return actionGroupBean.addActions(groupID, actions);
|
|
|
|
|
return accessContext.loadAuthorities(actionGroupBean.addActions(groupID, actions));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int removeActions(String groupID, String... actions) {
|
|
|
|
|
return actionGroupBean.removeActions(groupID, actions);
|
|
|
|
|
return accessContext.loadAuthorities(actionGroupBean.removeActions(groupID, actions));
|
|
|
|
|
}
|
|
|
|
|
}
|