Browse Source

Merge pull request #6352 from nocodb/develop

pull/6353/head 0.111.4
github-actions[bot] 1 year ago committed by GitHub
parent
commit
d56ddefa05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      README.md
  2. 4
      packages/nc-gui/components/project/InviteProjectCollabSection.vue
  3. 54
      packages/nc-gui/package-lock.json
  4. 2
      packages/nc-gui/package.json
  5. 4
      packages/nocodb-sdk/package-lock.json
  6. 32
      packages/nocodb/package-lock.json
  7. 4
      packages/nocodb/package.json
  8. 4
      packages/nocodb/src/services/api-docs/swagger/templates/params.ts
  9. 21
      packages/nocodb/src/services/project-users/project-users.service.ts
  10. 2
      packages/nocodb/src/version-upgrader/NcUpgrader.ts

13
README.md

@ -192,14 +192,15 @@ npm start
Access Dashboard using: [http://localhost:8080/dashboard](http://localhost:8080/dashboard) Access Dashboard using: [http://localhost:8080/dashboard](http://localhost:8080/dashboard)
# Screenshots # Screenshots
![2](https://github.com/nocodb/nocodb/assets/86527202/a127c05e-2121-4af2-a342-128e0e2d0291)
![3](https://github.com/nocodb/nocodb/assets/86527202/674da952-8a06-4848-a0e8-a7b02d5f5c88)
![4](https://github.com/nocodb/nocodb/assets/86527202/cbc5152a-9caf-4f77-a8f7-92a9d06d025b)
![5](https://github.com/nocodb/nocodb/assets/86527202/dc75dfdc-c486-4f5a-a853-2a8f9e6b569a)
![1](https://user-images.githubusercontent.com/35857179/194844858-d353bd15-1edf-406c-889b-ba60f76831f4.png)
![2](https://user-images.githubusercontent.com/35857179/194844872-1a1094b9-761b-4ab6-a0ab-8e11dcae6571.png)
![3](https://user-images.githubusercontent.com/35857179/194844881-23f12c4c-7a5f-403e-928c-ef4c53b2665d.png)
![4](https://user-images.githubusercontent.com/35857179/194844885-faaf042f-bad2-4924-84f0-2c08813271d8.png)
![5](https://user-images.githubusercontent.com/35857179/194844886-a17006e0-979d-493f-83c4-0e72f5a9b716.png) ![5](https://user-images.githubusercontent.com/35857179/194844886-a17006e0-979d-493f-83c4-0e72f5a9b716.png)
![6](https://user-images.githubusercontent.com/35857179/194844890-b9f265ae-6e40-4fa5-9267-d1367c27c8e6.png) ![7](https://github.com/nocodb/nocodb/assets/86527202/be64e619-7295-43e2-aa95-cace4462b17f)
![7](https://user-images.githubusercontent.com/35857179/194844891-bee9aea3-aff3-4247-a918-b2f3fbbc672e.png) ![8](https://github.com/nocodb/nocodb/assets/86527202/4538bf5a-371f-4ec1-a867-8197e5824286)
![8](https://user-images.githubusercontent.com/35857179/194844893-82d5e21b-ae61-41bd-9990-31ad659bf490.png) ![8](https://user-images.githubusercontent.com/35857179/194844893-82d5e21b-ae61-41bd-9990-31ad659bf490.png)
![9](https://user-images.githubusercontent.com/35857179/194844897-cfd79946-e413-4c97-b16d-eb4d7678bb79.png) ![9](https://user-images.githubusercontent.com/35857179/194844897-cfd79946-e413-4c97-b16d-eb4d7678bb79.png)
![10](https://user-images.githubusercontent.com/35857179/194844902-c0122570-0dd5-41cf-a26f-6f8d71fefc99.png) ![10](https://user-images.githubusercontent.com/35857179/194844902-c0122570-0dd5-41cf-a26f-6f8d71fefc99.png)

4
packages/nc-gui/components/project/InviteProjectCollabSection.vue

@ -26,10 +26,10 @@ const usersData = ref<{
const isInvitingCollaborators = ref(false) const isInvitingCollaborators = ref(false)
const inviteCollaborator = async () => { const inviteCollaborator = async () => {
isInvitingCollaborators.value = true
if (isInvitingCollaborators.value) return if (isInvitingCollaborators.value) return
isInvitingCollaborators.value = true
try { try {
usersData.value = await inviteUser(inviteData) usersData.value = await inviteUser(inviteData)
usersData.roles = inviteData.roles usersData.roles = inviteData.roles

54
packages/nc-gui/package-lock.json generated

@ -37,7 +37,7 @@
"locale-codes": "^1.3.1", "locale-codes": "^1.3.1",
"monaco-editor": "^0.33.0", "monaco-editor": "^0.33.0",
"monaco-sql-languages": "^0.11.0", "monaco-sql-languages": "^0.11.0",
"nocodb-sdk": "0.111.3", "nocodb-sdk": "file:../nocodb-sdk",
"papaparse": "^5.3.2", "papaparse": "^5.3.2",
"parse-github-url": "^1.0.2", "parse-github-url": "^1.0.2",
"pinia": "^2.1.4", "pinia": "^2.1.4",
@ -131,7 +131,6 @@
}, },
"../nocodb-sdk": { "../nocodb-sdk": {
"version": "0.111.3", "version": "0.111.3",
"extraneous": true,
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"dependencies": { "dependencies": {
"axios": "^0.21.1", "axios": "^0.21.1",
@ -8944,6 +8943,7 @@
"version": "1.15.2", "version": "1.15.2",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
"devOptional": true,
"funding": [ "funding": [
{ {
"type": "individual", "type": "individual",
@ -11680,21 +11680,8 @@
} }
}, },
"node_modules/nocodb-sdk": { "node_modules/nocodb-sdk": {
"version": "0.111.3", "resolved": "../nocodb-sdk",
"resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.111.3.tgz", "link": true
"integrity": "sha512-Drn8818AHqs6M6NgDHE+oEqSy2+3FuTIrXrhtUk/jN0vfPjLaT1rN3E10qBHADmVcpUFPXau8vMNVpFWlfnHDQ==",
"dependencies": {
"axios": "^0.21.1",
"jsep": "^1.3.6"
}
},
"node_modules/nocodb-sdk/node_modules/axios": {
"version": "0.21.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"dependencies": {
"follow-redirects": "^1.14.0"
}
}, },
"node_modules/node-abi": { "node_modules/node-abi": {
"version": "3.45.0", "version": "3.45.0",
@ -23611,7 +23598,8 @@
"follow-redirects": { "follow-redirects": {
"version": "1.15.2", "version": "1.15.2",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
"devOptional": true
}, },
"for-each": { "for-each": {
"version": "0.3.3", "version": "0.3.3",
@ -25631,22 +25619,24 @@
} }
}, },
"nocodb-sdk": { "nocodb-sdk": {
"version": "0.111.3", "version": "file:../nocodb-sdk",
"resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.111.3.tgz",
"integrity": "sha512-Drn8818AHqs6M6NgDHE+oEqSy2+3FuTIrXrhtUk/jN0vfPjLaT1rN3E10qBHADmVcpUFPXau8vMNVpFWlfnHDQ==",
"requires": { "requires": {
"@typescript-eslint/eslint-plugin": "^4.0.1",
"@typescript-eslint/parser": "^4.0.1",
"axios": "^0.21.1", "axios": "^0.21.1",
"jsep": "^1.3.6" "cspell": "^4.1.0",
}, "eslint": "^7.8.0",
"dependencies": { "eslint-config-prettier": "^6.11.0",
"axios": { "eslint-plugin-eslint-comments": "^3.2.0",
"version": "0.21.4", "eslint-plugin-functional": "^3.0.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", "eslint-plugin-import": "^2.22.0",
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", "eslint-plugin-prettier": "^4.0.0",
"requires": { "jsep": "^1.3.6",
"follow-redirects": "^1.14.0" "npm-run-all": "^4.1.5",
} "prettier": "^2.1.1",
} "rimraf": "^5.0.1",
"tsc-alias": "^1.8.7",
"typescript": "^4.7.4"
} }
}, },
"node-abi": { "node-abi": {

2
packages/nc-gui/package.json

@ -60,7 +60,7 @@
"locale-codes": "^1.3.1", "locale-codes": "^1.3.1",
"monaco-editor": "^0.33.0", "monaco-editor": "^0.33.0",
"monaco-sql-languages": "^0.11.0", "monaco-sql-languages": "^0.11.0",
"nocodb-sdk": "0.111.3", "nocodb-sdk": "file:../nocodb-sdk",
"papaparse": "^5.3.2", "papaparse": "^5.3.2",
"parse-github-url": "^1.0.2", "parse-github-url": "^1.0.2",
"pinia": "^2.1.4", "pinia": "^2.1.4",

4
packages/nocodb-sdk/package-lock.json generated

@ -1,12 +1,12 @@
{ {
"name": "nocodb-sdk", "name": "nocodb-sdk",
"version": "0.111.2", "version": "0.111.3",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "nocodb-sdk", "name": "nocodb-sdk",
"version": "0.111.2", "version": "0.111.3",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"dependencies": { "dependencies": {
"axios": "^0.21.1", "axios": "^0.21.1",

32
packages/nocodb/package-lock.json generated

@ -98,7 +98,7 @@
"ncp": "^2.0.0", "ncp": "^2.0.0",
"nestjs-kafka": "^1.0.6", "nestjs-kafka": "^1.0.6",
"nestjs-throttler-storage-redis": "^0.3.0", "nestjs-throttler-storage-redis": "^0.3.0",
"nocodb-sdk": "0.111.3", "nocodb-sdk": "file:../nocodb-sdk",
"nodemailer": "^6.4.10", "nodemailer": "^6.4.10",
"object-hash": "^3.0.0", "object-hash": "^3.0.0",
"object-sizeof": "^2.6.1", "object-sizeof": "^2.6.1",
@ -211,7 +211,6 @@
}, },
"../nocodb-sdk": { "../nocodb-sdk": {
"version": "0.111.3", "version": "0.111.3",
"extraneous": true,
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"dependencies": { "dependencies": {
"axios": "^0.21.1", "axios": "^0.21.1",
@ -14383,13 +14382,8 @@
} }
}, },
"node_modules/nocodb-sdk": { "node_modules/nocodb-sdk": {
"version": "0.111.3", "resolved": "../nocodb-sdk",
"resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.111.3.tgz", "link": true
"integrity": "sha512-Drn8818AHqs6M6NgDHE+oEqSy2+3FuTIrXrhtUk/jN0vfPjLaT1rN3E10qBHADmVcpUFPXau8vMNVpFWlfnHDQ==",
"dependencies": {
"axios": "^0.21.1",
"jsep": "^1.3.6"
}
}, },
"node_modules/node-abort-controller": { "node_modules/node-abort-controller": {
"version": "3.1.1", "version": "3.1.1",
@ -30908,12 +30902,24 @@
"requires": {} "requires": {}
}, },
"nocodb-sdk": { "nocodb-sdk": {
"version": "0.111.3", "version": "file:../nocodb-sdk",
"resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.111.3.tgz",
"integrity": "sha512-Drn8818AHqs6M6NgDHE+oEqSy2+3FuTIrXrhtUk/jN0vfPjLaT1rN3E10qBHADmVcpUFPXau8vMNVpFWlfnHDQ==",
"requires": { "requires": {
"@typescript-eslint/eslint-plugin": "^4.0.1",
"@typescript-eslint/parser": "^4.0.1",
"axios": "^0.21.1", "axios": "^0.21.1",
"jsep": "^1.3.6" "cspell": "^4.1.0",
"eslint": "^7.8.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-functional": "^3.0.2",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-prettier": "^4.0.0",
"jsep": "^1.3.6",
"npm-run-all": "^4.1.5",
"prettier": "^2.1.1",
"rimraf": "^5.0.1",
"tsc-alias": "^1.8.7",
"typescript": "^4.7.4"
} }
}, },
"node-abort-controller": { "node-abort-controller": {

4
packages/nocodb/package.json

@ -131,7 +131,7 @@
"ncp": "^2.0.0", "ncp": "^2.0.0",
"nestjs-kafka": "^1.0.6", "nestjs-kafka": "^1.0.6",
"nestjs-throttler-storage-redis": "^0.3.0", "nestjs-throttler-storage-redis": "^0.3.0",
"nocodb-sdk": "0.111.3", "nocodb-sdk": "file:../nocodb-sdk",
"nodemailer": "^6.4.10", "nodemailer": "^6.4.10",
"object-hash": "^3.0.0", "object-hash": "^3.0.0",
"object-sizeof": "^2.6.1", "object-sizeof": "^2.6.1",
@ -223,4 +223,4 @@
"coverageDirectory": "../coverage", "coverageDirectory": "../coverage",
"testEnvironment": "node" "testEnvironment": "node"
} }
} }

4
packages/nocodb/src/services/api-docs/swagger/templates/params.ts

@ -1,4 +1,4 @@
import { RelationTypes, UITypes } from 'nocodb-sdk'; import { isLinksOrLTAR, RelationTypes, UITypes } from 'nocodb-sdk'
import type { LinkToAnotherRecordColumn } from '~/models'; import type { LinkToAnotherRecordColumn } from '~/models';
import type { SwaggerColumn } from '../getSwaggerColumnMetas'; import type { SwaggerColumn } from '../getSwaggerColumnMetas';
@ -100,7 +100,7 @@ export const columnNameQueryParam = {
export const columnNameParam = (columns: SwaggerColumn[]) => { export const columnNameParam = (columns: SwaggerColumn[]) => {
const columnNames = []; const columnNames = [];
for (const { column } of columns) { for (const { column } of columns) {
if (column.uidt !== UITypes.LinkToAnotherRecord || column.system) continue; if (!isLinksOrLTAR(column) || column.system) continue;
columnNames.push(column.title); columnNames.push(column.title);
} }

21
packages/nocodb/src/services/project-users/project-users.service.ts

@ -1,6 +1,7 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { import {
AppEvents, AppEvents,
extractRolesObj,
OrgUserRoles, OrgUserRoles,
PluginCategory, PluginCategory,
ProjectRoles, ProjectRoles,
@ -53,6 +54,26 @@ export class ProjectUsersService {
param.projectUser, param.projectUser,
); );
if (
getProjectRolePower({
project_roles: extractRolesObj(param.projectUser.roles),
}) > getProjectRolePower(param.req.user)
) {
NcError.badRequest(`Insufficient privilege to invite with this role`);
}
if (
![
ProjectRoles.CREATOR,
ProjectRoles.EDITOR,
ProjectRoles.COMMENTER,
ProjectRoles.VIEWER,
ProjectRoles.NO_ACCESS,
].includes(param.projectUser.roles as ProjectRoles)
) {
NcError.badRequest('Invalid role');
}
const emails = (param.projectUser.email || '') const emails = (param.projectUser.email || '')
.toLowerCase() .toLowerCase()
.split(/\s*,\s*/) .split(/\s*,\s*/)

2
packages/nocodb/src/version-upgrader/NcUpgrader.ts

@ -68,7 +68,7 @@ export default class NcUpgrader {
'', '',
'nc_store', 'nc_store',
{ {
value: JSON.stringify(config), value: JSON.stringify({ version: config.version }),
}, },
{ {
key: NcUpgrader.STORE_KEY, key: NcUpgrader.STORE_KEY,

Loading…
Cancel
Save