public override SCObjectSet Execute(HttpRequest req) { string[] ids = req.Form.GetValues("id"); if (ids == null && ids.Length == 0) { throw new HttpException("当获取功能对象时,必须提供ID参数"); } string appId = req.Form["appId"]; if (string.IsNullOrEmpty(appId)) { throw new HttpException("当获取功能对象时,必须提供appId参数"); } SCObjectSet objectSet = new SCObjectSet(); objectSet.Scope = "AppPermissions"; PC.SCApplication appObj = (PC.SCApplication)PC.Adapters.SchemaObjectAdapter.Instance.Load(appId); if (appObj == null || appObj.Status != SchemaObjectStatus.Normal) { throw new HttpException("指定的应用不存在或者已删除"); } objectSet.Objects = ExportQueryHelper.LoadObjects(ids, null); objectSet.Membership = ExportQueryHelper.LoadMembershipFor(ids, appId); return(objectSet); }
public override SCObjectSet Execute(HttpRequest req) { string[] ids = req.Form.GetValues("memberIds"); string groupId = req.Form["groupId"]; if (ids == null || ids.Length < 0) { throw new HttpException("当获取角色固定成员数据时,必须提供memberIds参数"); } if (string.IsNullOrEmpty(groupId)) { throw new HttpException("当获取角色固定成员数据时,必须提供group"); } SCObjectSet objectSet = new SCObjectSet(); objectSet.Scope = "GroupConstMembers"; objectSet.Membership = ExportQueryHelper.LoadMembershipFor(ids, groupId); return(objectSet); }