Added artisan user:restore and domain:restore commands
Details
- Reviewers
vanmeeuwen - Group Reviewers
Restricted Project - Commits
- rK2022a3f5a265: Restoring a user/domain
./phpunit
Diff Detail
- Repository
- rK kolab
- Branch
- dev/user-restore
- Lint
No Lint Coverage - Unit
No Test Coverage - Build Status
Buildable 32521 Build 12544: arc lint + arc unit
Event Timeline
src/app/Domain.php | ||
---|---|---|
271 | Isn't STATUS_LDAP_READY removed when the associated job is done? | |
src/app/Jobs/Domain/CreateJob.php | ||
20 | Marking a domain as deleted in LDAP is still valid, though, so I'd expect the domain to show up in LDAP with inetdomainstatus &= 8. | |
src/app/Observers/DomainObserver.php | ||
134 | When a domain is restored, we don't update the updated_at column of the entitlements table because it's used to track payment status / due dates for new charges. | |
150 | I believe created_at will remain what it was, which would be the expected result. I also believe $domain->save() will automatically update updated_at. | |
src/app/Observers/UserObserver.php | ||
290 | Here too, please avoid touching updated_at. | |
src/app/User.php | ||
722 | This should be an effect of having the associated jobs executed successfully, no? |
- Complete restoring/restored events handlers in user and domain observers
- Add test for user:restore command
- Add domain:restore command
- Complete restoring/restored events handlers in user and domain observers
- Add test for user:restore command
- Add domain:restore command
- Set proper status in user/domain DeleteJob
src/app/Console/Commands/DomainRestore.php | ||
---|---|---|
46 | I don't understand this part. When john@kolab.org deletes itself and needs to be restored, is the situation not always that both the User as well as the Domain are deleted? Does it then mandate that first user:restore john@kolab.org is ran? |
src/app/Console/Commands/DomainRestore.php | ||
---|---|---|
46 | It's just that you cannot restore a domain before restoring the user. But the command is still useful if you restore a domain (one of many) on an existing account. |