예제 #1
0
        public IEnumerable <Device> Get([FromQuery] int skip = 0, [FromQuery] int top = 0, [FromQuery] string filter = null, [FromQuery] string scope = null)
        {
            var totalCount = new OptionalOutTotalCount();

            bool isFullAcess = false;

            if (User.IsInRole("SGI.MASTER"))
            {
                isFullAcess = true;
            }

            // passar o "User", para ver se tem acesso aos devices do cliente
            var devices = _sgiService.GetDevices(User, skip, top, filter, totalCount, isFullAcess, scope);

            Request.SetListTotalCount(totalCount.Value);
            return(devices);
        }