Applied API role specs to short URL creation

This commit is contained in:
Alejandro Celaya
2021-01-04 20:15:42 +01:00
parent 19834f6715
commit 4b67d41362
15 changed files with 314 additions and 7 deletions

View File

@@ -51,6 +51,8 @@ class SingleStepCreateShortUrlAction extends AbstractCreateShortUrlAction
return new CreateShortUrlData($longUrl, [], ShortUrlMeta::fromRawData([
ShortUrlMetaInputFilter::API_KEY => $apiKeyResult->apiKey(),
// This will usually be null, unless this API key enforces one specific domain
ShortUrlMetaInputFilter::DOMAIN => $request->getAttribute(ShortUrlMetaInputFilter::DOMAIN),
]));
}
}