My question is - if there is a bunch of developers using Salesforce DX and they are connected to one org, is there a way to monitor who and when retrieved the metadata of an org?
-
1What are you trying to accomplish?– identigralCommented Feb 7, 2022 at 16:55
-
This question exposes a design flaw with your dev ops process. Nobody should ever be retrieving metadata from a central org after the initial building of the package. All development should be done in individual Scratch Orgs, merged into branches in a source code repository, and then installed using Unlocked Packages.– sfdcfox ♦Commented Feb 7, 2022 at 21:14
-
@sfdcfox Hi, do you please know about any sources where I could learn about what you just said? I know how to create Scratch Orgs, but I don't know how do branches work with Salesforce DX/source code repository. Does it mean that if a team is working on let's say a Lightning Web Component, there is only one person who has access to production/testing org, and only that person can retrieve metadata from that org? Because if there are multiple people with access to testing/production environment, then all of them can retrieve any metadata and the code is leaked? I am understanding it right?– DevelBase2Commented Feb 8, 2022 at 9:58
-
@identigral I guess I was thinking about protecting existing code in an org from leaking, but now when I think about it, as long as someone has access to an org and has permissions like "View setup and configuration", they can retrieve all the org's metadata.– DevelBase2Commented Feb 8, 2022 at 10:02
-
1@DevelBase2 See, for example, this. The point isn't to protect the code, which the devs should have full access to in the repo anyways. The point is to avoid collisions and overwriting data by using it repositories. Also, with Continuous Integration, you can make it such that the developers don't need access to production/testing orgs, just their own Scratch Orgs.– sfdcfox ♦Commented Feb 8, 2022 at 13:16
1 Answer
I suppose that you could find a way to do that if you threw enough money and time at it, but that's not a feature that Salesforce DX offers. To the best of my knowledge, Salesforce doesn't store any "last accessed time".
Reading things is generally a non-issue. If it is an issue, then the appropriate controls for that would be profiles and permission sets.
Usually, the issue is with writing things (i.e. making sure one person doesn't accidentally overwrite someone else's work.) SFDX does not attempt to address that issue, instead leaving it to be handled by a source/version control tool like git (or subversion, or mercurial, or team foundation server, etc...)
-
Thanks, I'm trying to learn how things work with code deployment and retrieval in larger teams of developers. Commented Feb 8, 2022 at 10:03