mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
document approvals and protection
This commit is contained in:
parent
58c88e2127
commit
f4f32bcfcb
20 changed files with 891 additions and 777 deletions
|
@ -171,7 +171,7 @@ func setupAccount(rt *env.Runtime, completion onboardRequest, serial string) (er
|
|||
}
|
||||
|
||||
// assign permissions to space
|
||||
perms := []string{"view", "manage", "own", "doc-add", "doc-edit", "doc-delete", "doc-move", "doc-copy", "doc-template"}
|
||||
perms := []string{"view", "manage", "own", "doc-add", "doc-edit", "doc-delete", "doc-move", "doc-copy", "doc-template", "doc-approve"}
|
||||
for _, p := range perms {
|
||||
sql = fmt.Sprintf("insert into permission (orgid, who, whoid, action, scope, location, refid) values (\"%s\", 'user', \"%s\", \"%s\", 'object', 'space', \"%s\")", orgID, userID, p, labelID)
|
||||
_, err = runSQL(rt, sql)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
## TODO
|
||||
## PENDING REMOVALS
|
||||
|
||||
1. Remove audit table
|
||||
2. Remove document.layout field ?
|
||||
NONE
|
||||
|
||||
## MYSQL ENCODING
|
||||
|
||||
|
|
14
core/database/scripts/autobuild/db_00017.sql
Normal file
14
core/database/scripts/autobuild/db_00017.sql
Normal file
|
@ -0,0 +1,14 @@
|
|||
/* enterprise edition */
|
||||
|
||||
-- document needs proection and approval columns
|
||||
ALTER TABLE document ADD COLUMN `protection` INT NOT NULL DEFAULT 0 AFTER `template`;
|
||||
ALTER TABLE document ADD COLUMN `approval` INT NOT NULL DEFAULT 0 AFTER `protection`;
|
||||
|
||||
-- page needs proection and approval columns
|
||||
ALTER TABLE page ADD COLUMN `protection` INT NOT NULL DEFAULT 0 AFTER `revisions`;
|
||||
ALTER TABLE page ADD COLUMN `approval` INT NOT NULL DEFAULT 0 AFTER `protection`;
|
||||
|
||||
-- data migration clean up from previous releases
|
||||
DROP TABLE IF EXISTS `audit`;
|
||||
DROP TABLE IF EXISTS `search_old`;
|
||||
ALTER TABLE document DROP COLUMN `layout`;
|
Loading…
Add table
Add a link
Reference in a new issue