예제 #1
0
파일: RolesDto.cs 프로젝트: yjpark/squidex
        public static RolesDto FromApp(IAppEntity app, ApiController controller)
        {
            var result = new RolesDto
            {
                Items = app.Roles.Values.Select(x => RoleDto.FromRole(x, app, controller)).OrderBy(x => x.Name).ToArray()
            };

            return(result.CreateLinks(controller, app.Name));
        }
예제 #2
0
        public static RolesDto FromApp(IAppEntity app, Resources resources)
        {
            var result = new RolesDto
            {
                Items =
                    app.Roles.All
                    .Select(x => RoleDto.FromRole(x, app))
                    .Select(x => x.WithLinks(resources))
                    .OrderBy(x => x.Name)
                    .ToArray()
            };

            return(result.CreateLinks(resources));
        }