Skip to main content

builtin_policies

Function builtin_policies 

Source
pub fn builtin_policies() -> Vec<BuiltinPolicy>
Expand description

Every policy this build ships compiled in. Fixed at compile time – see this module’s doc comment.

One BuiltinPolicy per statement per action the statement can decide, exactly as an operator’s record is registered, because it is the same code that splits it.

§Adding one

Write the record in floor/, with its cases beside it, and add it to builtins with the collections it reaches. A PR asking to be denied as a client is a denyClient statement under oauth.authorize, oauth.token and record.write, reaching Scope::Any collections, so the application is refused at sign-in and at token issue, and a token it already holds is refused at the write. Then change ships_exactly_these_builtins: adding one is its own reviewed change.

§Panics

If a built-in’s record does not read, or names an action this server does not answer. That is a defect in floor/, not a runtime condition: this crate’s tests read every one of them. Whether a record’s predicate compiles is the engine’s answer, made where an operator’s record gets it – crate::compile – and the_floor_compiles is what holds the floor to compiling cleanly.