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. 2
      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)
# 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)
![6](https://user-images.githubusercontent.com/35857179/194844890-b9f265ae-6e40-4fa5-9267-d1367c27c8e6.png)
![7](https://user-images.githubusercontent.com/35857179/194844891-bee9aea3-aff3-4247-a918-b2f3fbbc672e.png)
![7](https://github.com/nocodb/nocodb/assets/86527202/be64e619-7295-43e2-aa95-cace4462b17f)
![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)
![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)

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

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

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

@ -37,7 +37,7 @@
"locale-codes": "^1.3.1",
"monaco-editor": "^0.33.0",
"monaco-sql-languages": "^0.11.0",
"nocodb-sdk": "0.111.3",
"nocodb-sdk": "file:../nocodb-sdk",
"papaparse": "^5.3.2",
"parse-github-url": "^1.0.2",
"pinia": "^2.1.4",
@ -131,7 +131,6 @@
},
"../nocodb-sdk": {
"version": "0.111.3",
"extraneous": true,
"license": "AGPL-3.0-or-later",
"dependencies": {
"axios": "^0.21.1",
@ -8944,6 +8943,7 @@
"version": "1.15.2",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
"devOptional": true,
"funding": [
{
"type": "individual",
@ -11680,21 +11680,8 @@
}
},
"node_modules/nocodb-sdk": {
"version": "0.111.3",
"resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.111.3.tgz",
"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"
}
"resolved": "../nocodb-sdk",
"link": true
},
"node_modules/node-abi": {
"version": "3.45.0",
@ -23611,7 +23598,8 @@
"follow-redirects": {
"version": "1.15.2",
"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": {
"version": "0.3.3",
@ -25631,22 +25619,24 @@
}
},
"nocodb-sdk": {
"version": "0.111.3",
"resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.111.3.tgz",
"integrity": "sha512-Drn8818AHqs6M6NgDHE+oEqSy2+3FuTIrXrhtUk/jN0vfPjLaT1rN3E10qBHADmVcpUFPXau8vMNVpFWlfnHDQ==",
"version": "file:../nocodb-sdk",
"requires": {
"@typescript-eslint/eslint-plugin": "^4.0.1",
"@typescript-eslint/parser": "^4.0.1",
"axios": "^0.21.1",
"jsep": "^1.3.6"
},
"dependencies": {
"axios": {
"version": "0.21.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"requires": {
"follow-redirects": "^1.14.0"
}
}
"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-abi": {

2
packages/nc-gui/package.json

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

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

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

32
packages/nocodb/package-lock.json generated

@ -98,7 +98,7 @@
"ncp": "^2.0.0",
"nestjs-kafka": "^1.0.6",
"nestjs-throttler-storage-redis": "^0.3.0",
"nocodb-sdk": "0.111.3",
"nocodb-sdk": "file:../nocodb-sdk",
"nodemailer": "^6.4.10",
"object-hash": "^3.0.0",
"object-sizeof": "^2.6.1",
@ -211,7 +211,6 @@
},
"../nocodb-sdk": {
"version": "0.111.3",
"extraneous": true,
"license": "AGPL-3.0-or-later",
"dependencies": {
"axios": "^0.21.1",
@ -14383,13 +14382,8 @@
}
},
"node_modules/nocodb-sdk": {
"version": "0.111.3",
"resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.111.3.tgz",
"integrity": "sha512-Drn8818AHqs6M6NgDHE+oEqSy2+3FuTIrXrhtUk/jN0vfPjLaT1rN3E10qBHADmVcpUFPXau8vMNVpFWlfnHDQ==",
"dependencies": {
"axios": "^0.21.1",
"jsep": "^1.3.6"
}
"resolved": "../nocodb-sdk",
"link": true
},
"node_modules/node-abort-controller": {
"version": "3.1.1",
@ -30908,12 +30902,24 @@
"requires": {}
},
"nocodb-sdk": {
"version": "0.111.3",
"resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.111.3.tgz",
"integrity": "sha512-Drn8818AHqs6M6NgDHE+oEqSy2+3FuTIrXrhtUk/jN0vfPjLaT1rN3E10qBHADmVcpUFPXau8vMNVpFWlfnHDQ==",
"version": "file:../nocodb-sdk",
"requires": {
"@typescript-eslint/eslint-plugin": "^4.0.1",
"@typescript-eslint/parser": "^4.0.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": {

2
packages/nocodb/package.json

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

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 { SwaggerColumn } from '../getSwaggerColumnMetas';
@ -100,7 +100,7 @@ export const columnNameQueryParam = {
export const columnNameParam = (columns: SwaggerColumn[]) => {
const columnNames = [];
for (const { column } of columns) {
if (column.uidt !== UITypes.LinkToAnotherRecord || column.system) continue;
if (!isLinksOrLTAR(column) || column.system) continue;
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 {
AppEvents,
extractRolesObj,
OrgUserRoles,
PluginCategory,
ProjectRoles,
@ -53,6 +54,26 @@ export class ProjectUsersService {
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 || '')
.toLowerCase()
.split(/\s*,\s*/)

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

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

Loading…
Cancel
Save