pub struct Access<P: 'static> {
pub mode: Mode,
pub teams: BTreeMap<TeamName, P>,
pub collaborators: BTreeMap<UserName, P>,
}Expand description
Repository team and collaborator access policy.
P is the forge’s permission type.
Fields§
§mode: ModeWhether undeclared direct grants are removed.
teams: BTreeMap<TeamName, P>The desired permission of each declared team.
collaborators: BTreeMap<UserName, P>The desired permission of each declared collaborator.
Implementations§
Source§impl<P: Clone + PartialEq> Access<P>
impl<P: Clone + PartialEq> Access<P>
Sourcepub fn plan_collaborators(
&self,
direct: &BTreeMap<UserName, Observed<P>>,
caller: Option<&Caller>,
) -> Vec<CollaboratorDecision<P>>
pub fn plan_collaborators( &self, direct: &BTreeMap<UserName, Observed<P>>, caller: Option<&Caller>, ) -> Vec<CollaboratorDecision<P>>
Compare the declared collaborators with the direct grants the forge reports.
Declared users come first in name order. In owned mode, the removals of undeclared direct grants follow in name order. The removal of the caller’s own grant is a self removal.
Source§impl<P: Clone + Display + PartialEq> Access<P>
impl<P: Clone + Display + PartialEq> Access<P>
Sourcepub fn plan(&self, grants: &Grants<'_, P>) -> Vec<AccessDecision<P>>
pub fn plan(&self, grants: &Grants<'_, P>) -> Vec<AccessDecision<P>>
Compare the declared access with what the forge reports.
Declared teams come first in name order. In owned mode, the removals of undeclared direct grants follow in name order. A removal of a team the caller belongs to is a self removal.
Trait Implementations§
impl<P: Eq + 'static> Eq for Access<P>
impl<P: PartialEq + 'static> StructuralPartialEq for Access<P>
Auto Trait Implementations§
impl<P> Freeze for Access<P>
impl<P> RefUnwindSafe for Access<P>
impl<P> Send for Access<P>
impl<P> Sync for Access<P>
impl<P> Unpin for Access<P>
impl<P> UnsafeUnpin for Access<P>
impl<P> UnwindSafe for Access<P>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.