Read files from Pasteboard file-url inside macOS sandbox - swiftui

I would like to show a preview of the file contained in the pasteboard inside my sandboxed app. I'm able to do this using the QuickLookThumbnailing package.
Unfortunately, this requires a read access and does not work for files that are not inside the basics folders, such as Download, Video, Photo and Music.
For other cases I will get the error couldn't issue sandbox extension com.apple.app-sandbox.read for '<path to file>'
I understood that in the sandbox design, file's access are supposed to be approve from the user somehow.
But in other application (sandboxed too), I can paste a file without being prompted for any confirmation.
How do they do this ?
Finder never provide a Security-Scoped Bookmark inside the pasteboard.

You don't get a security scoped bookmark but a path/URL that has read/write rights granted. You then create a security scoped bookmark and store it for subsequent access. This works for the general pasteboard (copy-paste) as well as for the drag clipboard.

Related

Sitecore content editor redirects to Page not foud

Due to some publishing issues i corrupted my local enviroment. Luckily i had backup which i restored and my local site was functioning well but, when i login to sitecore and choose any option from main page like Content Editor or Desktop it redirects to page not found.
I've tried to disable exceptions which redirect to page but they were of no use. And no logs are being created. Should i replace the entire wwwroot folder but, my wwwroot backup is 2 months old.
Or should i start from scratch and create a new sitecore site for same solution. I've compared my web.config,connection strings files they don't seem o have any problem.
Suggest what to do.
You are able to login but seems due to some permission issue you are not able to Content Editor/Desktop. Check permission on folders like identityserver(used for login)/your website(content editor and other CMS work), to start with you can try to give permission to your IIS User/Everyone (as shown in image), once it starts working you can be selective and change permission as per your need
enter image description here

Google Drive: What combination of scopes lets an app read existing files but not have edit/delete privileges?

I've found that with https://www.googleapis.com/auth/drive scope, my app can read all existing files (and their contents) in a Google Drive, but when I auth the app, it says that this scope can also delete files in the drive and I don't want to grant that.
I know that by itself https://www.googleapis.com/auth/drive.file only allows the app to read files created by the app itself or especially granted access.
I've tried other combinations, but can't find one where the the app can read the contents of any file I can see, but can't delete anything. This is the closest I've come:
https://www.googleapis.com/auth/drive.metadata
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/drive.activity
https://www.googleapis.com/auth/documents
Is there a combination that will achieve my goal?
Based on your needs, you should be eyeing https://www.googleapis.com/auth/drive.readonly. This enables you to read the file metadata and content.
Allows read-only access to file metadata and file content.
Resource:
Scopes
There isn't one if you have access to read and write to a file then you will also have access to delete that file.
Its how they have permissions setup.
If you don't want to upload and only download try drive readonly.
scopes#drive
If you're not intending to create any files or save any data to Drive, then you have the https://www.googleapis.com/auth/drive.readonly scope.
Note that this is a restricted scope that will grant your app with read-only access to the user's entire Drive, but it will also prevent your app from creating any new files or editing existing ones.
If you want your application to be able to access the entire Drive, and you're planning to release your app to the public, you should submit your application to a restricted scope verification and security assessment; otherwise your app will be limited to 100 users, and users will see a warning while your app is unverified.
Here's more information:
OAuth 2.0 Scopes for Google APIs - Drive API, v3
Additional Requirements for Specific API Scopes section in the Google API Services User Data Policy
OAuth API verification FAQs

I got an error while trying to publish my Android app that read: "You told us your app doesn't comply with the Location permissions policy"

[google-people] I have an Android app that I recently published to the play store. I got an error while trying to publish the app that read: "You told us your app doesn't comply with the Location permissions policy". I am not sure what this means, but here is some context about my situation.
My app, the one I tried to publish is a flavor of another app. So, I have a Main app and a copy of Main(the flavor app). The copy contains all the features and functionalities of the Main app, with modifications to the colors and assets of the app. For this copy(flavor app) I did not require background location so I removed it from it's manifest. I did not remove it from Main's manifest. Just the copy(flavor app). So, Main app's manifest has the the background location permission enabled, but the copy(flavor app) does not.
Is it because my flavor app does not have the background location permission enabled? According to the developers page:
"Manifest files that were part of the build but did not contribute elements or attributes are listed under Other Manifest Files on the right." So, although Main's manifest gets merged into the flavors, it does not contribute elements or attributes to the final apk buid of the flavor.
I would highly appreciate some clarification and understanding to this issue.
Please see attached image or go to: https://developer.android.com/studio/build/manifest-merge#implicit_system_permissions?
According to the Requesting access to background location, Google Play requires a strict(er) set of requirements to be able to use background permissions for apps installed via the Google Play store. It provides a set of guidelines which have to be fulfilled to allow an app to enter- or remain in the store with said permissions.
In short you have to follow the steps given below at Google support to verify your apps location permission requirement.
https://support.google.com/googleplay/android-developer/answer/9214102?hl=en#zippy=

Check in via Sharing Dialog PHP SDK

The publish_actions permission is deprecated. This permission was very good for implementing Check-in via the place parameter. In the place parameter it was possible to put the Page ID and the Check in to be registered in the Page and also in the User Timeline.
Now we only have the option of Sharing Dialog which is very limited. I have not yet found any solution so that users can check in via Dialog Sharing. I want to implement this function in a custom Wi-Fi Hotspot. Does anyone have a solution?
Video example: https://wificem.com.br/video/hotspot-checkin.mp4

How to set permission for document library to enable file-> new option only in sharepoint 2013

I'm using SharePoint 2013.
I need to enable new option only for user. other option need to disable in document library.
below is my screen shots for your reference.
I need to enable new option only for user. other option like Open&Check out, Manage, share&Track, copies, workflows, tags & notes need to disable also Library.
how to set and what permission need to be set.
Most of your requirements can be achieved with a custom permission level. If you create a new permission level and grant the user only Add Items, View Items (required), View Pages and Open access, they will only be able to upload and view items.
However, this will not stop them from opening items already uploaded. The permission level requires they have the access to open if you want them to upload.
The only other way I can think of to accomplish your request is to create a file upload web part that will run with elevated privledges, allowing the user to upload a document even if they do not have access to the library.