Skip to content

Commit

Permalink
1.0.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
wyatt-herkamp committed May 23, 2022
1 parent 3fd6fe7 commit 0beba61
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nitro_repo"
version = "1.0.0"
version = "1.0.1"
authors = ["Wyatt Jacob Herkamp <[email protected]>"]
edition = "2021"
build = "build.rs"
Expand Down
11 changes: 3 additions & 8 deletions backend/src/system/permissions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ pub struct UserPermissions {

impl UserPermissions {
pub fn can_access_repository(&self) -> bool {
return self.admin || self.repository_manager;
self.admin || self.repository_manager
}
}

impl FromSql<Text, Mysql> for UserPermissions {
fn from_sql(
bytes: Option<&<diesel::mysql::Mysql as Backend>::RawValue>,
bytes: Option<&<Mysql as Backend>::RawValue>,
) -> deserialize::Result<UserPermissions> {
let t = <String as FromSql<Text, Mysql>>::from_sql(bytes)?;
let result: UserPermissions = serde_json::from_str(t.as_str())?;
Expand All @@ -74,18 +74,13 @@ pub struct RepositoryPermission {
pub permissions: Vec<String>,
}

#[derive(Serialize, Deserialize, Debug)]
#[derive(Serialize, Deserialize, Debug, Default)]
pub struct RepositoryPermissionValue {
pub policy: Option<Policy>,
#[serde(rename = "type")]
pub repo_type: Option<String>,
}

impl Default for RepositoryPermission {
fn default() -> Self {
RepositoryPermission { permissions: vec![] }
}
}


pub fn can_deploy(
Expand Down
6 changes: 3 additions & 3 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "site",
"version": "1.0.0",
"version": "1.0.1",
"private": true,
"scripts": {
"dev": "vite",
Expand Down
4 changes: 2 additions & 2 deletions nitro_repo-api-wrapper/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nitro_repo-api-wrapper/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nitro_repo/nitro_repo-api-wrapper",
"version": "1.0.0",
"version": "1.0.1",
"description": "The Implementation of the Nitro_Repo API in Typescript",
"author": "Wyatt Jacob Herkamp",
"license": "MIT",
Expand Down

0 comments on commit 0beba61

Please sign in to comment.