Returns effective reservation role of resource for the purpose of authorizing an operation; that is, the the role of the most refined reservation if the resource is reserved. NOTE: If the resource is not reserved, the default role '*' is returned; this is needed to handle authorization of invalid operations and could be avoided if we were able to guarantee that authorization Objects for invalid o
| 114 | // NOTE: If the resource is not in the post-reservation-refinement |
| 115 | // format, this function will crash the program. |
| 116 | string getReservationRole(const Resource& resource) |
| 117 | { |
| 118 | CHECK(!resource.has_role()) << resource; |
| 119 | CHECK(!resource.has_reservation()) << resource; |
| 120 | |
| 121 | return Resources::isReserved(resource) |
| 122 | ? Resources::reservationRole(resource) : "*"; |
| 123 | } |
| 124 | |
| 125 | |
| 126 | void ActionObject::pushUnreserveActionObjects( |
no outgoing calls
no test coverage detected