载入中...
搜索中...
未找到
ConditionKeys.cpp
浏览该文件的文档.
2
3namespace eve::condition {
4
5std::optional<std::string> authorityAllowScope(const Value& arguments) {
6 const Value* scopeValue = arguments.find(std::string("scope"));
7 const auto* scopeText = scopeValue == nullptr ? nullptr : scopeValue->getIf<std::string>();
8 if (scopeText == nullptr || scopeText->empty()) return std::nullopt;
9 return *scopeText;
10}
11
12} // namespace eve::condition
Canonical Compare key prefixes and PolicyCall names for thin conditions.
The canonical owning dynamic value used by data-facing protocols.
Definition Value.h:31
const T * getIf() const noexcept
Return a typed pointer, or nullptr when the kind differs.
Definition Value.h:209
Value * find(const std::string &key) noexcept
Return an object member, or nullptr when absent.
Definition Value.cpp:244
std::optional< std::string > authorityAllowScope(const Value &arguments)
Extract the scope string from an authority.allow argument object.