Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramarti committed Feb 17, 2024
1 parent 84b1b8d commit 72bd846
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions contracts/modules/licensing/UMLPolicyFrameworkManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ contract UMLPolicyFrameworkManager is
bytes calldata policyData
) external override nonReentrant onlyLicensingModule returns (bool) {
UMLPolicy memory policy = abi.decode(policyData, (UMLPolicy));
bool linkAllowed = true;

// Trying to burn a license to create a derivative, when the license doesn't allow derivatives.
if (!policy.derivativesAllowed) {
Expand All @@ -92,18 +91,18 @@ contract UMLPolicyFrameworkManager is

// If the policy defines the licensor must approve derivatives, check if the
// derivative is approved by the licensor
if (policy.derivativesApproval) {
linkAllowed = linkAllowed && isDerivativeApproved(licenseId, ipId);
if (policy.derivativesApproval && !isDerivativeApproved(licenseId, ipId)) {
return false;
}
// Check if the commercializerChecker allows the link
if (policy.commercializerChecker != address(0)) {
// No need to check if the commercializerChecker supports the IHookModule interface, as it was checked
// when the policy was registered.
if (!IHookModule(policy.commercializerChecker).verify(caller, policy.commercializerCheckerData)) {
linkAllowed = false;
return false;
}
}
return linkAllowed;
return true;
}

/// @notice Verify policy parameters for minting a license.
Expand Down

0 comments on commit 72bd846

Please sign in to comment.