I'll need help, on how to generate new user and how to give permission to them. Unfortunately, the tutorial wasn't enough for me. I'll leave the code, hoping you can help me

users
dynamic: .‘Users’
user-initializer: (
‘Type’ = create ‘Unknown’ ( )
)

	passwords: .'Passwords'
		password-value: .'Data'.'Password'
		password-status: .'Data'.'Active' (
			| active => 'Yes' ( )
			| reset => 'No' ( )
		)
		password-initializer: (
			'Data' = ( )
		)

	authorities: .'Authorities'
		identities: .'Identities'>'User'
		identity-initializer: ( )

interfaces

root {
can-update: user .‘Type’?‘Admin’

'Users': collection ['Name'] {
	'Name': text
	'Type': stategroup (
		'Admin' { }
		'Unknown' { }
	)
}
'Passwords': collection ['User'] {
	'User': text -> ^ .'Users'[]
	'Data': group {
		can-update: user is ( ^ >'User' )

		'Password': text
		'Active': stategroup (
			'No' { }
			'Yes' { }
		)
	}
}
'Authorities': collection ['Authority'] {
	'Authority': text
	'Identities': collection ['Identity'] {
		'Identity': text
		'User': text -> ^ ^ .'Users'[]
	}
}
'Provinces': collection ['Name'] {
	'Name': text
	// ex 1
	'Person': reference-set -> downstream ^ .'Person'* .'provinces'* = inverse >'Name'
	'Count': number 'count' = count <'Person'* .'employment status'?'employed'
	// ex 2
	'Person address': reference-set -> downstream ^ .'Person'* .'address'* = inverse >'province'
	'Persons': collection ['uid'] = union (
		'address refs' = <'Person address'[ ^ .'Person'* ]
	) {
		'uid': text -> downstream ^ ^ .'Person'[] = key
	}
	//'Count2': number 'count' = count .'Persons'* ...
}
'Person': collection ['uid'] {
	'uid': text
	'BSN': number positive 'bsn-number'
	'first name': text
	'last name': text
	'age': number positive 'age'
	'address': collection ['postcode'] {
		'postcode': text
		'street name number': text
		'city': text
		'province': text -> ^ ^ .'Provinces'[]
		// stategroup (
		// 	'North-Holland' { }
		// 	'South-Hollan' { }
		// 	'Flevoland' { }
		// 	'Utrecht' { }
		// 	'Drenthe' { }
		// 	'Zeeland' { }
		// 	'Brabant' { }
		// 	'Groningen' { }
		// 	'Overijssel' { }
		// 	'Friesland' { }
		// 	'Limburg' { }
		// )
	}
	'provinces': collection ['Name'] = union (
		'address' = .'address'* >'province'
	) {
		'Name': text -> ^ ^ .'Provinces'[] = key
		'employment status': stategroup = switch ^ .'employment status' (
			|'unemployed' => 'unemployed' ( )
			|'employed'   => 'employed' ( )
		) (
			'employed' { }
			'unemployed' { }
		)
	}
	'email': text
	'telephone number': text
	'employment status': stategroup (
		'employed' { }
		'unemployed' { }
	)
	'benefits': stategroup (
		'jobless' { } // WW uitkering
		'sickness' { } // IVA / arbeidsongeschikt
		'elderly' { } // IOW / AOW ?
	)
}
//'provicial-employment': collection ['province'] {
//	'provinces': text -> <path to collection>[]^ ^
//}

}
numerical-types
‘bsn-number’
‘age’
@numerical-type: (
label: “years old”
)
‘count’
// ‘template-type’
// general data
// specific case by case data
// PII

Hi Gino, I assume you followed the steps on Application Guide: Users & Authentication - Alan Platform - Model-Driven Software Development Platform

Did you update the systems/client/settings.alan and systems/sessions/config.alan and publish a new version of your app?

You can also share your online IDE account name in a private message to me, so I can have a look.

How can I send you a private message? I tried to reach you a week ago, but I couldn’t find my message or any response. I solve the problem, but I have a new one so I hope you can help me.

Click my username (above my post) and click the ‘Message’ button there.