			model.permissions.splice(index, 1);
			exports.upd('permissions');
		};

		exports.submit = function(hide) {
			var model = exports.form;

			if (!model.permissions)
				model.permissions = [];

			if (!model.permissions.findItem('value', 'admin'))
				model.permissions.unshift({ name: 'Admin', value: 'admin' });

			exports.tapi((model.id ? ('apps_update/' + model.id) : 'apps_create') + ' @showloading', model, ERROR(function() {
				SETTER('loading/hide');
				hide();
				exports.caller && exports.calle