add new fields

This commit is contained in:
Filip Gralinski 2016-02-14 08:44:16 +01:00
parent 35904ff04f
commit 92af354a88
3 changed files with 6 additions and 2 deletions

View File

@ -175,6 +175,7 @@ instance YesodAuth App where
, userName = Nothing
, userIsAdmin = False
, userLocalId = Nothing
, userIsAnonymous = Just False
}
-- You can add other plugins like BrowserID, email or OAuth here

View File

@ -123,7 +123,8 @@ getSubmission repoId commit challengeId description chan = do
submissionChallenge=challengeId,
submissionDescription=description,
submissionStamp=time,
submissionSubmitter=userId }
submissionSubmitter=userId,
submissionIsPublic=Just False }
getOuts :: Channel -> Key Submission -> Handler ([Out])
getOuts chan submissionId = do

View File

@ -3,8 +3,9 @@ User
password Text Maybe
UniqueUser ident
name Text Maybe
isAdmin Bool default=True
isAdmin Bool default=False
localId Text Maybe
isAnonymous Bool Maybe
deriving Typeable
PublicKey
user UserId
@ -46,6 +47,7 @@ Submission
description Text
stamp UTCTime default=now()
submitter UserId
isPublic Bool Maybe
UniqueSubmissionRepoCommitChallenge repo commit challenge
Fork
source SubmissionId