feat: complete Phase 0 Enterprise IAM
This commit is contained in:
1 parent
3d2d291006
commit
c2f5ba3f54
202 files changed
+21371
-1360
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import re
|
||||
|
||||
path = 'tests/password_reset_api.rs'
|
||||
with open(path, 'r') as f:
|
||||
content = f.read()
|
||||
|
||||
replacement = """
|
||||
let admin_role = state.provider.roles().find_by_name("admin").await.unwrap().unwrap();
|
||||
state.provider.roles().assign_to_user(&admin.id, &admin_role.id).await.unwrap();
|
||||
|
||||
(state, db_path, admin.id)
|
||||
"""
|
||||
|
||||
content = content.replace(" (state, db_path, admin.id)", replacement)
|
||||
|
||||
with open(path, 'w') as f:
|
||||
f.write(content)
|
||||
Reference in new issue
Block a user