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