Skip to content

Commit c5da8a5

Browse files
committed
fixed password credential data store
1 parent 84d6ebe commit c5da8a5

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

service/src/app-models/identity/setup-identity-store.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ export const setupIdentity = async (injector: Injector) => {
123123
},
124124
})
125125

126-
getRepository(injector).createDataSet(User, 'username', {
126+
const repo = getRepository(injector)
127+
128+
repo.createDataSet(User, 'username', {
127129
authorizeAdd: withRole('admin'),
128130
authorizeGet: withRole('admin'),
129131
authorizeRemove: withRole('admin'),
@@ -137,6 +139,13 @@ export const setupIdentity = async (injector: Injector) => {
137139
authorizeUpdate: withRole('admin'),
138140
})
139141

142+
repo.createDataSet(PasswordCredential, 'userName', {
143+
authorizeAdd: withRole('admin'),
144+
authorizeGet: withRole('admin'),
145+
authorizeUpdate: withRole('admin'),
146+
authorizeRemove: withRole('admin'),
147+
})
148+
140149
usePasswordPolicy(injector)
141150

142151
useHttpAuthentication(injector, {

0 commit comments

Comments
 (0)