AppGrant

@Serializable
data class AppGrant(val packageName: String, val webId: String, val appLabel: String, val entries: List<GrantEntry>, val grantedAt: String) : Parcelable

What one app may do as one WebID, as the user approved it on the host's consent screen.

There is one grant per (packageName, webId). The effective level for a call is the highest level among the entries that cover the call's target: GrantTarget.Pod covers everything, a GrantTarget.Resource covers by IRI prefix, and a GrantTarget.Module covers the module's verbs and the containers the module occupies, which only the host knows. levelOn takes that knowledge as a function so the model stays complete without it.

Constructors

Link copied to clipboard
constructor(packageName: String, webId: String, appLabel: String, entries: List<GrantEntry>, grantedAt: String)

Properties

Link copied to clipboard

The app's display name when the grant was made, for the host's own lists.

Link copied to clipboard

What the app may do; never empty for a stored grant.

Link copied to clipboard

The ISO-8601 instant the user approved the grant.

Link copied to clipboard

The Android package the grant belongs to; the host reads it from the caller's UID.

Link copied to clipboard

The account the app acts as.

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard

The highest level among the entries whose target satisfies covers, or null when none does.

Link copied to clipboard
fun levelOn(resourceUri: String, moduleRoots: (moduleId: String) -> List<String>): AccessLevel?

The highest level held on resourceUri, or null when no entry covers it. moduleRoots answers, for a module id, the container IRIs that module occupies on this account.

Link copied to clipboard

The highest level held on the data module moduleId, through a pod-wide or a module entry, or null when neither exists.

Link copied to clipboard

The level held on the whole pod, or null when no entry is GrantTarget.Pod.

Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)