INSERT INTO `cms__resource`(
    `resourceID`,
    `moduleID`,
    `name`,
    `description`
) VALUES (
    'core.tag.list',
    1,
    'core.tag.list.name',
    'core.tag.list.description'
 );

 INSERT INTO `cms__resource`(
    `resourceID`,
    `moduleID`,
    `name`,
    `description`
) VALUES (
    'core.tag.remove',
    1,
    'core.tag.remove.name',
    'core.tag.remove.description'
 );

 insert into smd__default_role_has_resources (defaultRoleID, resourceID) select defaultRoleID, 'core.tag.list' as resourceID from smd__default_role

 insert into smd__default_role_has_resources (defaultRoleID, resourceID) select defaultRoleID, 'core.tag.remove' as resourceID from smd__default_role WHERE defaultRoleID = 'admin'
 insert into smd__default_role_has_resources (defaultRoleID, resourceID) select defaultRoleID, 'core.tag.remove' as resourceID from smd__default_role WHERE defaultRoleID = 'superAdmin'

 insert into smd__organization_role_has_resources (roleID, resourceID) select roleID, 'core.tag.list' as resourceID from smd__organization_role

 insert into smd__organization_role_has_resources (roleID, resourceID) select roleID, 'core.tag.remove' as resourceID from smd__organization_role WHERE roleID LIKE '%.superAdmin.%'
 insert into smd__organization_role_has_resources (roleID, resourceID) select roleID, 'core.tag.remove' as resourceID from smd__organization_role WHERE roleID LIKE '%.admin.%'