// <#-- Auth Store -->
Ext.define('App.store.AuthStore', {
	extend: 'Ext.data.Store',

	constructor: function(cfg) {
		var me = this;
		cfg = cfg || {};
		me.callParent([Ext.apply({
			proxy: {
				type: 'ajax',
				url: App.url('/user/group/authlist.json'),
				extraParams: cfg.extraParams || {},
				reader: {
					type: 'json',
					root: 'records',
					idProperty: 'authority'
				}
			},
			groupField: 'module',
			fields: [
				{
					name: 'authority',
					type: 'string'
				},
				{
					name: 'module',
					type: 'string'
				},
				{
					name: 'name',
					type: 'string'
				},
				{
					name: 'description',
					type: 'string'
				}
			],
		},
		cfg)]);
	}
});

