docs: private Assignment createAssignment(
              IPermission permission, IAuthorizationPrincipal authP, boolean inherited) {
  
          Assignment rslt = null;
  
          try {
  
              // Owner
              IPermissionOwner owner = permissionOwnerDao.getPermissionOwner(permission.getOwner());
              Owner ownerImpl = new OwnerImpl(permission.getOwner(), owner.getName());
  
              // Activity
              IPermissionActivity activity =
                      permissionOwnerDao.getPermissionActivity(
                              permission.getOwner(), permission.getActivity());
              Activity activityImpl = new ActivityImpl(permission.getActivity(), activity.getName());
  
              // Principal
              Principal principalImpl = new PrincipalImpl(authP.getKey(), authP.getPrincipalString());
  
              // Target
              Target targetImpl = null; // default
              IPermissionTargetProvider targetProvider =
                      targetProviderRegistry.getTargetProvider(activity.getTargetProviderKey());
              IPermissionTarget target = targetProvider.getTarget(permission.getTarget());
              if (target != null) {
                  targetImpl = new TargetImpl(permission.getTarget(), target.getName());
              }
  
              rslt =
                      new AssignmentImpl(
                              ownerImpl, activityImpl, principalImpl, targetImpl, inherited);
  
          } catch (Exception e) {
              log.warn("Exception while adding permission", e);
          }
  
          return rslt;
      }