Пример #1
0
        public DataResult <bool> AssignResourcePermissionTypeActionsToUser(int id, IEnumerable <int> permissionTypeActionIds)
        {
            try
            {
                m_userUoW.AssignResourcePermissionTypeActionsToUser(id, permissionTypeActionIds);

                return(Success(true));
            }
            catch (NoResultException <UserEntity> e)
            {
                m_logger.LogWarning(e);
                return(Error <bool>(m_translator.Translate("invalid-user-id"), DataResultErrorCode.UserNotExistId));
            }
            catch (DatabaseException e)
            {
                m_logger.LogWarning(e);
                return(Error <bool>(e.Message));
            }
        }