User Tools

Site Tools


stats:schema:account

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

stats:schema:account [2011/10/01 11:05]
Patrick Michel [User Accounts and Roles]
stats:schema:account [2013/07/10 12:50]
Line 1: Line 1:
-====== User Accounts and Roles ====== 
- 
-This page describes a major part of the [[:​stats:​start]] [[:​stats:​schema]],​ namely the user accounts and the [[:​stats:​roles]] handling. It is part of [[stats]]. 
- 
-===== Schema ===== 
- 
-<code xcend> 
-  element accounts {                [ size(./​account/​admin) > 0 ] # NEW 
-    element account * username {    # 2.1    
-      attribute lastName ​           { string } 
-      attribute firstName ​          { string } 
-      attribute email               { string } 
-      attribute password ​           { string } 
-  
-      element admin ?               { } 
-      element examiner * exam       {[ exists //​exams/​exam[./​exam] ]} # 1.1, 2.3 
-      element assistant * exercise ​ {[ exists //​exercises/​exercise[./​exercise] ]} # 1.2, 2.4 
-      element tutor * exercise {    ​ 
-        element group * id          {[ exists //​exercises/​exercise[../​exercise]/​groups/​group[./​id] ]} # 1.3, 2.5 
-      }                              
-      element student ? {            
-        attribute id                { ident [ unique //​acounts/​account/​student[.] ]} # 2.2 
-      }                              
-    }                                
-  }                                  
-</​code>​ 
- 
-===== Procedures ===== 
- 
-==== Change Attributes ==== 
- 
-{{page>​stats:​proc:​changeAttributes (Account)&​noheader&​nofooter}} 
-==== Student Role ==== 
- 
-The students in the [[exercise]] section, as well as the participants in the [[exam]] section, depend on the student role. This restricts the deletion of the role, i.e. the host language first has to delete these dependencies with corresponding procedures. 
- 
-{{page>​stats:​proc:​addStudentId&​noheader&​nofooter}} 
- 
-{{page>​stats:​proc:​removeStudentId&​noheader&​nofooter}} 
- 
- 
-==== Admin Role ==== 
- 
-The admin role is pretty much just a flag, without any constraints at all. The precondition is therefore only concerned with uniqueness and trivial stuff. 
- 
-{{page>​stats:​proc:​grantAdminRights&​noheader&​nofooter}} 
- 
-{{page>​stats:​proc:​revokeAdminRights&​noheader&​nofooter}} 
- 
- 
-==== Examiner Role ==== 
- 
-The examiner role has to fulfill integrity constraints and has a counterpart in the [[exam]] section of the document. 
- 
-{{page>​stats:​proc:​grantExaminerRights&​noheader&​nofooter}} 
- 
-{{page>​stats:​proc:​revokeExaminerRights&​noheader&​nofooter}} 
- 
-==== Assistant Role ==== 
- 
-The assistant role relates to exercises like the examiner role relates to exams, so it also has to fulfill integrity constraints and has a counterpart in [[exercise]]. 
- 
-{{page>​stats:​proc:​grantAssistantRights&​noheader&​nofooter}} 
- 
-{{page>​stats:​proc:​revokeAssistantRights&​noheader&​nofooter}} 
- 
-==== Tutor Role ==== 
- 
-The tutor role also behaves similarly, but this time it references two identifiers in the [[exercise]] section, where it also has a counterpart. 
- 
-This modeling of tutor rights is different from the current implementation. It might also be a nice design, if you can be tutor for an exercise, without (yet) having a group. This would grant some access rights already, I think. 
- 
-{{page>​stats:​proc:​grantTutorRights&​noheader&​nofooter}} 
- 
-{{page>​stats:​proc:​revokeTutorRights&​noheader&​nofooter}} 
  
stats/schema/account.txt ยท Last modified: 2013/07/10 12:50 (external edit)