Cloudkit安全角色 [英] Cloudkit Security Roles

查看:82
本文介绍了Cloudkit安全角色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在CloudKit中看到的安全更新的唯一用途是授予另一个团队成员对cloudkit仪表板的访问权限,以便修改仪表板中的表?这是正确的,还是我缺少什么?

The only use I can see for Security Rolls in CloudKit is granting another team member access to the cloudkit Dashboard in order to modify the tables in the dashboard? Is this correct, or am I missing something?

当前,我是唯一可以登录到信息中心且无法添加其他团队成员的人。我认为这是因为我已注册为Apple的单一开发人员?我希望以此为基础在公共数据库上建立某种类型的安全性,但似乎我无法通过安全性角色来做到这一点。

Currently I am the only one who can login to the dashboard and I can't add another team Member. I think this is because I am registered as a single developer with Apple? I was hoping to use this to set up some type of security on the public database but it seems that I can't do that with security roles.

我试图为公共数据库设置三种不同类型的用户:

I am trying to set up three different types of users for the public database:

我将在同一容器中运行3个应用程序。

I will have 3 apps running in this same container.

1。)管理员-单独的应用程序

1.) Admin - Separate App

2。消费者-单独的应用程序

2.) Consumer - Separate App

3。)承包商-单独的应用程序

3.) Contractor - Separate App

我找到了这个线程:

如何访问cloudkit中的安全角色

看来我必须在每个应用程序中添加安全性才能仅访问该类型用户允许的数据?

It appears that I have to add the security in each app to access only the data allowed for that type of user?

推荐答案

我已经设置了多个共享同一容器的应用,您不仅需要在Xcode本身中进行配置,还需要在

I have setup multiple apps sharing the same container, you need to not only configure this in Xcode itself, but also in the code you write.

let container = CKContainer(identifier: "iCloud.yourDB")
let publicDB = container.publicCloudDatabase

访问权限是基于iCloud用户而非应用程序授予的。因此,如果您要让所有三个应用程序在使用相同iCloud ID的设备上运行,那么它们将都可以访问相同的公共&

Access is granted on a iCloud user basis, not an app basis. So if your going to have all three apps running on devices using the same iCloud ID, than they will all have access to the same public & private databases, with the default permissions.

您需要编码才能创建&在管理应用中写入数据库。大概是在承包商应用程序中写入数据库,在用户应用程序中读取数据库;一个示例场景。

You would need "code" the ability to "create" & "write-to" your database in the admin app. Presumably "write-to" the database in the contractor app and "read-from" the database in your consumer app; an example scenario.

但是,如果计划是让多个iCloud用户使用共享同一容器的不同应用程序,那么您的选择将受到更大的限制。私有数据库就是私有的。因此,不同的iCloud用户不能共享同一私有数据库,您不能更改权限期限,只能共享公共数据库。

However if the plan is for multiple iCloud users to use different apps sharing the same container, than your options are more limited. The private database is just that, private. So different iCloud users cannot share the same private database, you can not change the permissions period, they can only share the public database.

在公共数据库中,默认权限将被授予每个人都具有读取权限,只允许身份验证[登录到iCloud帐户]用户创建新记录并将所说的已创建记录与创建它们的用户链接的能力。

In the public database default permissions will grant everybody read access, only allow authenticate [logged into iCloud account] users the ability to create new records and link said created records with the users that created them.

用另一种方式如果经过身份验证的用户[A]在公共数据库中创建了一条记录,则用户[B]可以读取该记录,但是没有写入权限可以更新它;您将/可以更改访问权限,以授予他们这样做的权利,如果您有此要求,您将在仪表板上进行更改。

Put another way if an authenticated User [A] creates a record in the public database, user [B] can read it, but has no write access to update it; you would/could change access to give them the right to do so if you that was a requirement, a change you would make on the dashboard.

但是请注意,配额据我了解,公共数据库上的链接未链接到iCloud帐户,而是链接到该应用程序。因此,如果您创建一个将大量数据转储到公共数据库中的应用程序;当/如果您的应用程序用户超过每个应用程序的每个用户允许的公共数据库配额,Apple将向您发送账单。 [是的,因此您的应用程序的用户越多,您获得的公共数据库配额就越多,但是您应该/需要限制单个用户可以声称限制iCloud费用责任的数量!]

But beware, the quota on the public database are not linked to the iCloud accounts as I understand it, they are linked to the app. So if you create an app that dumps large amounts of data into the public database; Apple will send you the bill when/if your app user exceeds the public database quota allowed per user per app. [yes, so the more users for your app, the more public database quota you get, but you should/need to limit the amount individual users can claim to limit your liability for iCloud costs!]

我可能会误解了苹果公司对它的工作方式的描述/将要向用户/应用收费的最后一段,所有方式都有待澄清。

I may have miss-understood Apple's description of how it works/is going to bill users/apps the last paragraph, open to clarification by all means.

这篇关于Cloudkit安全角色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆