clckwrks 0.26.0 → 0.26.1
raw patch · 2 files changed
+13/−3 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Clckwrks/Authenticate/API.hs +12/−2
- clckwrks.cabal +1/−1
Clckwrks/Authenticate/API.hs view
@@ -11,12 +11,12 @@ import Control.Monad.State (get) import Control.Monad.Trans (liftIO) import Clckwrks.Authenticate.Plugin (AcidStateAuthenticate(..), authenticatePlugin)-import Data.Acid as Acid (AcidState, query)+import Data.Acid as Acid (AcidState, query, update) import Data.Maybe (maybe) import Data.Monoid (mempty) import Data.Text (Text) import Data.UserId (UserId)-import Happstack.Authenticate.Core (GetUserByUserId(..), Email(..), User(..), Username(..))+import Happstack.Authenticate.Core (GetUserByUserId(..), Email(..), UpdateUser(..), User(..), Username(..)) import Web.Plugins.Core (Plugin(..), When(Always), addCleanup, addHandler, addPluginState, getConfig, getPluginRouteFn, getPluginState, getPluginsSt, initPlugin) getUser :: UserId -> Clck url (Maybe User)@@ -24,6 +24,16 @@ do p <- plugins <$> get ~(Just (AcidStateAuthenticate authenticateState)) <- getPluginState p (pluginName authenticatePlugin) liftIO $ Acid.query authenticateState (GetUserByUserId uid)++-- | Update an existing 'User'. Must already have a valid 'UserId'.+--+-- no security checks are performed to ensure that the caller is+-- authorized to change data for the 'User'.+insecureUpdateUser :: User -> Clck url ()+insecureUpdateUser user =+ do p <- plugins <$> get+ ~(Just (AcidStateAuthenticate authenticateState)) <- getPluginState p (pluginName authenticatePlugin)+ liftIO $ Acid.update authenticateState (UpdateUser user) getUsername :: UserId -> Clck url (Maybe Username) getUsername uid =
clckwrks.cabal view
@@ -1,5 +1,5 @@ Name: clckwrks-Version: 0.26.0+Version: 0.26.1 Synopsis: A secure, reliable content management system (CMS) and blogging platform Description: clckwrks (pronounced, clockworks) aims to compete directly with popular PHP-based blogging and CMS