예제 #1
0
        private Object[] BuildArgs(String fileOrDirURL, String principal, bool isRole, PermissionTypes permissionType)
        {
            FileOperation  operation = GetOperation();
            BasePermission permission;

            if (isRole)
            {
                permission = new FileRolePermission();
            }
            else
            {
                permission = new FileUserPermission();
            }

            permission.folder    = fileOrDirURL;
            permission.access    = permissionType;
            permission.operaiton = operation;

            if (principal != null)
            {
                return new Object[] { principal, permission }
            }
            ;
            else
            {
                return new Object[] { permission }
            };
        }
    private Object[] BuildArgs( String fileOrDirURL, String principal, bool isRole, PermissionTypes permissionType )
    {
      FileOperation operation = GetOperation();
      BasePermission permission;

      if( isRole )
        permission = new FileRolePermission();
      else
        permission = new FileUserPermission();

      permission.folder = fileOrDirURL;
      permission.access = permissionType;
      permission.operaiton = operation;

      if( principal != null )
        return new Object[] { Backendless.AppId, Backendless.VersionNum, principal, permission };
      else
        return new Object[] { Backendless.AppId, Backendless.VersionNum, permission };
    }