diff --git a/Foundation.hs b/Foundation.hs index fbf4738..c71b2f8 100644 --- a/Foundation.hs +++ b/Foundation.hs @@ -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 diff --git a/Handler/ShowChallenge.hs b/Handler/ShowChallenge.hs index 816dafb..926e9b7 100644 --- a/Handler/ShowChallenge.hs +++ b/Handler/ShowChallenge.hs @@ -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 diff --git a/config/models b/config/models index d52533d..a9190fa 100644 --- a/config/models +++ b/config/models @@ -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