-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change the default on File Grant #501
Comments
@silverstripe/core-team Any views on this. Auto-grant was very needed early on, but we updater the asset store to do a can view check in later minors. Do we expect this to cause a lot of headaches for people upgrading? Do we have a preferences between having dedicated method for sessions granting vs changing the default parameter to |
The second option - checking permissions before providing a session grant - seems like a good default as it preserves the intent of the original implementation while clearing out bad cases. Of course, it assumes that there is a clear notion of view permissions and so might be limited to use on the File object. If you had no grant at all by default, what would it mean, specifically, for people upgrading projects? That seems to be an important question to answer when determining upgrade impact. |
cms-editors would need to have a view permissions on files explicitly set so that they're able to view draft files. There's a couple of ways I can think of doing this:
This seems like a fairly minimal upgrade step that would need to be documented |
Yeah I agree that for a major bump that seems fine. |
@maxime-rainville , I implemented "Check canView" option, since if we switch default to |
@sabina-talipova This is based mostly on this part of the conversation:
@emteknetnz Can you please confirm that your intention is to say that it would be appropriate to implement this chance as per the acceptance criteria? |
Default of the optional param must be |
File::getURL()
andgetSourceURL()
implicitly session grant you access to view the file. This has cause us no ends of grievance over the years. We should change that behaviour in CMS5 either to:false
so you don't get an implicit session grant orsilverstripe-assets/src/File.php
Lines 894 to 914 in db24a78
While the change itself is pretty simple it could have a lot of downstream affect that might not be immediately apparent.
Acceptance criteria
Note
PR
The text was updated successfully, but these errors were encountered: