anchor.diff:      UserId = user_ctx:get_user_id(UserCtx),
       SpaceId = file_ctx:get_space_id_const(FileCtx),
   
  -    check_is_dir(FileCtx),
       assert_has_space_privilege(SpaceId, UserId, ?SPACE_MANAGE_SHARES),
   
       case file_meta:remove_share(FileCtx, ShareId) of
  
positive.code:     UserId = user_ctx:get_user_id(UserCtx),
      SpaceId = file_ctx:get_space_id_const(FileCtx),
  
      check_is_dir(FileCtx),
      assert_has_space_privilege(SpaceId, UserId, ?SPACE_MANAGE_SHARES),
  
      case share_logic:create(SessionId, ShareId, Name, SpaceId, ShareGuid) of
  
negative.code: 
  
  %% @private
  -spec assert_has_space_privilege(od_space:id(), od_user:id(),
      privileges:space_privilege()) -> ok | no_return().
  assert_has_space_privilege(SpaceId, UserId, Privilege) ->
  