code: public void unsubscribeResourceFor(
          CmsRequestContext context,
          String poolName,
          CmsPrincipal principal,
          CmsResource resource)
      throws CmsException {
  
          CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
          try {
              m_driverManager.unsubscribeResourceFor(dbc, poolName, principal, resource);
          } catch (Exception e) {
              dbc.report(
                  null,
                  Messages.get().container(
                      Messages.ERR_UNSUBSCRIBE_RESOURCE_FOR_GROUP_2,
                      context.getSitePath(resource),
                      principal.getName()),
                  e);
          } finally {
              dbc.clear();
          }
      }
docs: Unsubscribes the principal from the resource.<p>
  
  @param context the request context
  @param poolName the name of the database pool to use
  @param principal the principal that unsubscribes from the resource
  @param resource the resource to unsubscribe from
  
  @throws CmsException if something goes wrong