Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli/config): Add permissions support #12767

Closed
wants to merge 1 commit into from

Conversation

crowlKats
Copy link
Member

Closes #12763.

Going to add tests later. Some things like naming are still to be decided on

@crowlKats crowlKats changed the title feat(cli/config): Add permissions supprot feat(cli/config): Add permissions support Nov 15, 2021
Comment on lines +1159 to +1168
fn visit_seq<V>(self, mut v: V) -> Result<Self::Value, V::Error>
where
V: de::SeqAccess<'de>,
{
let mut granted_list = vec![];
while let Some(value) = v.next_element::<String>()? {
granted_list.push(value);
}
Ok(Some(granted_list))
}
Copy link
Member Author

@crowlKats crowlKats Nov 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should encountering an empty seq return None? because

"permissions": {
    "net": [],
  }

is the same as "net": true, though an empty array seems more like "net": false behaviour would be expected

@bartlomieju bartlomieju added this to the 1.17.0 milestone Nov 17, 2021
@bartlomieju bartlomieju removed this from the 1.17.0 milestone Dec 10, 2021
@stale
Copy link

stale bot commented Feb 9, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 9, 2022
@stale stale bot closed this Feb 17, 2022
@crowlKats crowlKats deleted the perm_config branch May 13, 2022 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: add permissions to config file
2 participants