Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Documentation
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
snac
Documentation
Commits
ceabd718
Commit
ceabd718
authored
Mar 17, 2016
by
Tom Laudeman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created DBUser API.md, edit User Management.md as well, sync both
parent
7c1a323f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
14 deletions
+45
-14
User Management.md
Requirements/User Management.md
+18
-13
DBUtil API.md
Specifications/DBUtil API.md
+27
-1
No files found.
Requirements/User Management.md
View file @
ceabd718
...
@@ -20,21 +20,26 @@ especially our roles, and those will not be found in other system. There is not
...
@@ -20,21 +20,26 @@ especially our roles, and those will not be found in other system. There is not
user profiles. We might want their social networking profile, but social networking is not a core function of
user profiles. We might want their social networking profile, but social networking is not a core function of
SNAC.
SNAC.
By default users can't do anything that isn't exposed to the non-authenticated public users. Privileges are
By default, the lowest privileged users can't do anything that isn't exposed to the non-authenticated public
added and users are given roles (aka groups) from which they inherit privileges. The authorization system is
users. Privileges are added and users are given roles (aka groups) from which they inherit privileges. The
involved in every transaction with the server to the extent that every request to the server is checked for
authorization system is involved in every transaction with the server to the extent that every request to the
authorization before being passed to the code doing the real work.
server is checked for authorization before being passed to the code doing the real work. (Every request is
also checked for authentication as well, naturally.)
The Linux model of three privilege types "user", "group", and "other" works well for authorization permissions
The Linux model of three privilege types "user", "group", and "other" works well for authorization permissions
and we should use this model. "User" is an authenticated user. "Group" is a set of users, and a user may
and we should use this model, albeit somewhat simplfied. "User" is an authenticated user. "Group" is a set of
belong to several groups. In SNAC and the non-Linux world "group" is known as "role", so SNAC will call them
users, and a user may belong to several groups. In SNAC and the non-Linux world "group" is known as "role", so
"roles". "Other" privileges apply to SNAC as public, non-authenticated users, although we don't really have
SNAC will call them "roles". "Other" privileges apply to SNAC as public, non-authenticated users, although we
"other", and the "researcher" role applies to public users.
don't really have "other", and the "researcher" role applies to public users.
Users can have several roles, and will have all the privileges of all their roles. Role membership is managed
Each feature has a list of one or more authorized roles which may access that feature.
by an administrative UI (part of the dashboard) and related API code. User information such as name, phone
number, and even password can also change. User ID values cannot be changed, and a user ID is never reused,
Users can have several roles, and will have all the privileges (access to features) of all their roles. Role
even after account deletion.
membership is managed by an administrative UI (part of the dashboard) and related API code. Our system allows
access to every feature associated with any user role. (Just an aside: some high-security systems restrict
access to the least privileged role; like Linux, SNAC has a different model.) User information such as name,
phone number, and even password can also change. User ID values cannot be changed, and a user ID is never
reused, even after account deletion.
We expect to create additional roles as necessary for application functions.
We expect to create additional roles as necessary for application functions.
...
...
Specifications/DBUtil API.md
View file @
ceabd718
...
@@ -11,6 +11,32 @@ There is an interactive schema web site: [Schema web site](http://shannonvm.vill
...
@@ -11,6 +11,32 @@ There is an interactive schema web site: [Schema web site](http://shannonvm.vill
[
New DBUtil and initialization
](
#new-dbutil-and-initialization
)
[
New DBUtil and initialization
](
#new-dbutil-and-initialization
)
### Notes on undelete
Undelete is not currently implemented. There is a function clearDeleted(), but it is almost certainly is not
quite right, and we need agreement on how to call it.
As of Mar 10 2016 we have functioning object operation via setOperation() and getOperation() with valid
operations insert, update, delete. In this new world, undelete should be yet another operation, and should be
integrated into the existing operation code.
There are two problems:
1) delete and undelete are different for constellation vs component
2) it would be wrong for undelete to incorrectly undelete a component that was deleted before a constellation
was deleted
Issue (1) is typical for delete, and we need undelete code that is symmetrical with the delete operations.
Issue (2) is interesting. If a constellation is being undeleted, we should not also apply the undelete
operation to each component. Delete of a component is granular and undelete should be granular in the same
sense. That is: delete of a component happens independently of all other operations.
Likewise, constellation level delete should not allow component operations, thus it is probably best that
constellation delete not traverse the components. Likewise, constellation level undelete should only undelete
the constellation, and not traverse the components doing any operation, especially not component undelete.
### New DBUtil and initialization
### New DBUtil and initialization
When creating a DBUtil object, DBUtil currently calls $this->getAppUserInfo('system') to determine the user id
When creating a DBUtil object, DBUtil currently calls $this->getAppUserInfo('system') to determine the user id
...
@@ -85,7 +111,7 @@ $cObj = readPublishedConstellationByID($mainID);
...
@@ -85,7 +111,7 @@ $cObj = readPublishedConstellationByID($mainID);
// public function, return the list of constellations I'm editing
// public function, return the list of constellations I'm editing
// uses $this->appUserID in the DBUtil object
// uses $this->appUserID in the DBUtil object
$cObjList =
editConstellationList
();
$cObjList =
listConstellationsLockedToUser
();
$status = 'locked editing';
$status = 'locked editing';
$newVersion = writeConstellationStatus($mainID, $status, 'optional arg, version note');
$newVersion = writeConstellationStatus($mainID, $status, 'optional arg, version note');
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment