Changeset 7669


Ignore:
Timestamp:
Mar 21, 2019, 12:52:11 PM (3 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #2167: Permission denied when plug-in is trying to clone a session

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/PluginSessionControl.java

    r7642 r7669  
    7777 
    7878  /**
    79     @throws PermissionDeniedException Always
     79    @throws PermissionDeniedException If the userId is different from the currently logged in user
    8080  */
    8181  @Override
     
    8383    throws ItemNotFoundException, PermissionDeniedException, BaseException
    8484  {
    85     throw new PermissionDeniedException("impersonateLogin");
     85    if (userId != getLoggedInUserId()) throw new PermissionDeniedException("impersonateLogin");
     86    return super.impersonateLogin(userId, comment);
    8687  }
    87 
    88   /**
    89     @throws PermissionDeniedException Always
    90   */
    91   @Override
    92   public SessionControl impersonateLogin(Ownable item, String comment)
    93   {
    94     throw new PermissionDeniedException("impersonateLogin");
    95   }
    96 
    9788
    9889  /**
Note: See TracChangeset for help on using the changeset viewer.