app/models/plan.rb
# Returns whether or not minting is allowed for the current plan
Returns whether or not minting is allowed for the current plan
Returns whether or not minting is allowed for the current plan
def minting_allowed?
    orcid_scheme = IdentifierScheme.where(name: "orcid").first
    return false unless orcid_scheme.present?
    orcid = owner.identifier_for_scheme(scheme: orcid_scheme).present?
    token = ExternalApiAccessToken.for_user_and_service(user: owner, service: "orcid")
    visibility_allowed? && orcid.present? && token.present? && funder.present?
  end
def minting_allowed? orcid_scheme = IdentifierScheme . where ( name : "orcid" ) . first return false unless orcid_scheme . present? orcid = owner . identifier_for_scheme ( scheme : orcid_scheme ) . present? token = ExternalApiAccessToken . for_user_and_service ( user : owner , service : "orcid" ) visibility_allowed? && orcid . present? && token . present? && funder . present? end
Returns whether or not minting is allowed for the current plan
Returns whether or not minting is allowed for the current plan
# The owner must have an orcid and have authorized us to add to their record