MenuItemDefinition property "requiredPermissionName" is missing from 5.2.0 release (and pre-release) - aspnetboilerplate

There seems to be a breaking change in the latest release (5.2.0)
To replicate:
download the latest stable template for mvc core
Update all nuget packages to latest stable
The property requiredPermissionName is no longer available
Any steps to overcome would be appreciated...
Sample Code from Template (.net core MVC)
public class GpNavigationProvider : NavigationProvider
{
public override void SetNavigation(INavigationProviderContext context)
{
context.Manager.MainMenu
.AddItem(
new MenuItemDefinition(
PageNames.Home,
L("HomePage"),
url: "",
icon: "home",
requiresAuthentication: true
)
).AddItem(
new MenuItemDefinition(
PageNames.Tenants,
L("Tenants"),
url: "Tenants",
icon: "business",
requiredPermissionName: PermissionNames.Pages_Tenants
)
Compile Error:
Severity Code Description Project File Line Suppression State
Error CS1739
The best overload for 'MenuItemDefinition' does not have a parameter named 'requiredPermissionName'
...\5.1.1\aspnet-core\src\Gp.Web.Mvc\Startup\GpNavigationProvider.cs 29 Active

The change is straightforward:
// requiredPermissionName: PermissionNames.Pages_Tenants,
permissionDependency: new SimplePermissionDependency(PermissionNames.Pages_Tenants),
requiredPermissionName was deprecated in version 2.2 in July 2017.
It was removed in version 5.2 that was released yesterday, after 3 major versions and more than 2.5 years.
References:
aspnetboilerplate/aspnetboilerplate#2289 (ABP 2.2)
aspnetboilerplate/aspnetboilerplate#5191 (ABP 5.2)

Related

MvvmCross upgrade from 6.4.2 to 8.0.1

I recently upgraded MvvmCross from 6.4.2 to 8.0.1 version.
Both Xamarin.Android and Core projects have same nuget packages versions.
After upgrading in ViewModel in line: IMvxMessenger mvxMessenger = Mvx.IoCProvider.Resolve<IMvxMessenger>();
I get an error Failed to resolve type MvvmCross.Plugin.Messenger.IMvxMessenger
Has anyone already faced such a problem?
I have never used the 6.4.2 version but u can try to add this on initialize/setup
Mvx.IoCProvider.RegisterSingleton<IMvxMessenger>(() => new MvxMessengerHub());
This works on the 7.1.2 version
It is related to this issue documented on GitHub.
https://github.com/MvvmCross/MvvmCross/issues/4286
onurhazar commented on Oct 8:
We are having the same issue when we try to load MvxMessenger plugin.
It throws an exception at app launch (device only)(iOS). As a
workaround, you can override LoadPlugins method in Setup.cs like
below;
public override void LoadPlugins(IMvxPluginManager pluginManager)
{
base.LoadPlugins(pluginManager);
pluginManager.EnsurePluginLoaded<MvvmCross.Plugin.Messenger.Plugin>();
}

Missing refs while upgrading a Nativescript plugin (tns-core-modules → #nativescript/core migration)

I'm updating an existing plugin in order to make it compatible with the upcoming nativescript release.
All references to the tns-core-modules package have been replaced with #nativescript/core.
The released documentation says that the new libraries should be retro-compatible with older versions. Unfortunately in this case something must have changed (related to the view lifecycle), and the plugin is not 100% working.
That's why I attempted a full migration of it's dependencies, but the build process was not possible due to some errors:
node_modules/#nativescript/core/ui/frame/index.d.ts:494:38 - error TS2304: Cannot find name 'ModuleContext'.
494 export function reloadPage(context?: ModuleContext): void;
...
map-view.ios.ts:80:40 - error TS2304: Cannot find name 'WeakRef'.
80 public static initWithOwner(owner: WeakRef<MapView>): MapViewDelegateImpl {
node_modules/#nativescript/core/ui/styling/style/index.d.ts:31:39 - error TS2304: Cannot find name 'WeakRef'.
31 constructor(ownerView: ViewBase | WeakRef<ViewBase>);
I can build the plugin by setting skipLibCheck: true in tsconfig.json. It makes the plugin compile, but the problem comes out later at runtime.
So it must be solved to complete the migration.
Any hints?
Thank you!
Maybe it's not the 100% recommended solution, but in case that the same problem does happen to you, add this line to your tsconfig.json:
"types": [
"#nativescript/core",
],

Sonarqube 5.5 and mariadb

We are trying to upgrade to lastest sonarqube 5.5. We have mariadb 10.1 (latest) and since now we had no problems with sonarqube.
Now, with the upgrade, sonarqube will not boot. It says:
Unsupported mysql version: 5.5. Minimal supported version is 5.6.
Is there any trick we can use to make "sonar think" we are using mysql 5.6?
You could change the MINIMAL_SUPPORTED_DB_VERSIONS member in the Sonarqube's class https://github.com/SonarSource/sonarqube/blob/master/sonar-db/src/main/java/org/sonar/db/DatabaseChecker.java
private static final Map<String, Version> MINIMAL_SUPPORTED_DB_VERSIONS = ImmutableMap.of(
// MsSQL 2008 is 10.x
// MsSQL 2012 is 11.x
// MsSQL 2014 is 12.x
// https://support.microsoft.com/en-us/kb/321185
MsSql.ID, Version.create(10, 0, 0),
MySql.ID, Version.create(5, 6, 0),
Oracle.ID, Version.create(11, 0, 0),
PostgreSql.ID, Version.create(8, 0, 0)
);
And build the project again, but If they have that requirement it's possible that after the change not everything is going to work fine.
here is a bsdiff file.
you can Patch it with:
bspatch sonar-db-5.6.jar sonar-db-5.6.jar.new sonar-db-5.6.jar.patch
Replace it and it works!
https://drive.google.com/file/d/0B1EExMdpLmiLR1JmVFQ3ZTVPTlU/view?usp=sharing
MariaDB is not supported by SonarQube - still in v7. Please see this here:
SonarQube Requirements
The Solution to run SonarQube in combination with XAMPP is to change the database from MariaDB to MySQL. Here you'll find the steps for changing it:
https://gist.github.com/odan/c799417460470c3776ffa8adce57eece

cordova windows error: "cordova/windows8/commandProxy" not found

I have built a Cordova-based Windows application. As soon as I add any plugin, the app starts crashing with the exception cordova/windows8/commandProxy not found.
Cordova version: 4.3.0
It seems that cordova/windows8/commandProxy is deprecated in Cordova 4.3.0.
I have replaced this statement in plugin file
require("cordova/windows8/commandProxy")
to
require("cordova/exec/proxy")
and it seems to work.
For example I changed line number 18 in PushPluginProxy.js from
require("cordova/windows8/commandProxy").add("PushPlugin", module.exports);
to
require("cordova/exec/proxy").add("PushPlugin", module.exports);
The name in the string varies depending on the plugin.
Alternatively, you can patch the plugin like in this pull request from the AppVersion plugin i.e.:
Change
require("cordova/windows8/commandProxy").add("AppVersion", AppVersionProxy);
to
cordova.commandProxy.add("AppVersion", AppVersionProxy);

Apache Extras Cassandra-JDBC: Invalid method name: 'prepare_cql_query'

I'm using the Apache Extras project cassandra-jdbc ( http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/ ) on version 1.1.1 along with the cassandra-thrift and cassandra-clientutil dependencies on version 1.1.1.
My Cassandra version is 1.0.10 though. I had to use the cassandra-jdbc on version 1.1.1 because the PreparedStatements were not available in earlier versions.
The problem I'm getting is:
org.apache.thrift.TApplicationException: Invalid method name: 'prepare_cql_query'
at org.apache.thrift.TApplicationException.read(TApplicationException.java:108)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:71)
at org.apache.cassandra.thrift.Cassandra$Client.recv_prepare_cql_query(Cassandra.java:1438)
I read somewhere else ( https://wso2.org/jira/browse/CARBON-13577 ) this might be solved by upgrading Cassandra to 1.1.0, but I'm using DataStax so I'm not sure I can upgrade it. Is there another way to get past this?
That is for the simple reason that prepared statements are not supported until Cassandra 1.1: https://issues.apache.org/jira/browse/CASSANDRA-2475

Resources